Found this in the 1.12.2 mappings for net.minecraft.client.gui.GuiScreen, assuming it's the legacy equivalent:
/**
* Draws the screen and all the components in it.
*/
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
for (int i = 0; i < this.buttonList.size(); ++i)
{
((GuiButton)this.buttonList.get(i)).drawButton(this.mc, mouseX, mouseY, partialTicks);
}
for (int j = 0; j < this.labelList.size(); ++j)
{
((GuiLabel)this.labelList.get(j)).drawLabel(this.mc, mouseX, mouseY);
}
}
MCP Mappings (especially for newer version of MC) are often incomplete and contain arbitrary changes between versions, so looking at older mappings is definitely a good idea.
Mekanism is open source and has a 1.16 branch. Their GUI is here: https://github.com/mekanism/Mekanism/tree/1.16.x/src/main/java/mekanism/client/gui
It seems like they have to roll most of it from scratch, this class in the render package contains most of the low-level logic and event subscriptions: https://github.com/mekanism/Mekanism/blob/1.16.x/src/main/java/mekanism/client/render/MekanismRenderer.java
Good luck!