Posted June 25, 20232 yr I have a custom IGuiOverly defined to show the players hydration levels. Preferably, I would like it to appear between the hunger level tracker and the air bubble tracker. Currently I have manually positioned it above hunger with the RenderSystem and the GuiGraphics.blit method and it is just being drawn on top of the air tracker if a player submerges themselves. public static final IGuiOverlay HUD_THIRST = ((gui, guiGraphics, partialTick, screenWidth, screenHeight) -> { int x = screenWidth / 2; int y = screenHeight; RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); RenderSystem.setShaderTexture(0, EMPTY_THIRST); for(int i = 0; i < 10; i++) { guiGraphics.blit(EMPTY_THIRST, x + 8 + (i * 8), y -51, 0, 0, 13, 12, 13, 12); } RenderSystem.setShaderTexture(0, FILLED_THIRST); for(int i = 0; i < 10; i++) { if(ClientThirstData.get() > i) { guiGraphics.blit(FILLED_THIRST, x + 8 + (i * 8), y -51, 0, 0, 13, 12, 13, 12); } else { break; } } }); Is there a way to bump the air bubble tracker up a few few pixels or make my GUI overlay known to the vanilla classes to prevent overlapping? I'm the CEO of ✨breaking things ✨
June 27, 20232 yr Author Notes for self and anyone else it might help: the main forge event bus has several screen-related events, the vanilla Minecraft code also has an event for 'RenderGuiOverlayEvent' (Pre and Post), may be able to insert status bar as the vanilla gui is rendered and potentially manipulate gui elements from there. Edited June 27, 20232 yr by Capricocious typo I'm the CEO of ✨breaking things ✨
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.