I just migrated to 1.16.4, and I'm starting to develop a mod with my friends, so I still have little knowledge about some things in this version.
Anyways, I'm trying to render an UI above the hunger bar, and although the texture loads I'm having problems with the placement.
Well, it just deleted the hunger bar, and my bar replaced the health bar.
Here's the code:
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void renderGameOverlay(RenderGameOverlayEvent event)
{
if(Minecraft.getInstance().player.isCreative() == false)
{
Minecraft minecraft = Minecraft.getInstance();
int posX = event.getWindow().getWindowX();
int posY = event.getWindow().getWindowY();
minecraft.getTextureManager().bindTexture(new ResourceLocation("races:textures/gui/test_cooldown_gui.png"));
minecraft.ingameGUI.blit(event.getMatrixStack(), 0, 0, 0, 0, posX, posY, 80, 5);
}
}
And it looks like this (that exp-looking bar is mine):