Hi,
I have some code to add a HUD to the game containing FPS/Watermark/Coordinates etc, however when in survival mode it will break the health bar image.
The GUI is fine after the boxes are drawn, but after the string is added the inventory breaks.
Code:
@SubscribeEvent
public void onRender(RenderGameOverlayEvent event) {
Color Aqua = new Color(0, 255, 255, 175); //WaterMark Blue Box
drawRect(2, 16, 64, 1, Aqua.getRGB());
drawRect(3, 15, 63, 2, BlackColor.getRGB()); //WaterMark Black Box
mc.fontRendererObj.drawString(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "Water" + EnumChatFormatting.GRAY + "" + EnumChatFormatting.BOLD + "MA" + EnumChatFormatting.WHITE + "RK" + EnumChatFormatting.BOLD + "us", 6, 5, Integer.parseInt("000000", 16));
}
Any help is greatly appreciated, thank you.
UPDATE: changing the event to RenderGameOverlayEvent.post solves the health bar, but the armour is still broken.
UPDATE 2: change to text and works fine. solved