Jump to content

Zipcord

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Zipcord

  1. My x and y for drawing the rectangle is right above my health bar but it moves when i change my GUI and resolution. How to make it stay in the same place? package studio.zipcord; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class HudRenderer { @SubscribeEvent public void onRenderGameOverlay(RenderGameOverlayEvent.Post event) { if (event.type == RenderGameOverlayEvent.ElementType.ALL) { if (main.hideHealthBar) { drawRectangle(630, 860, 1000, 5, 0xFF0000FF); } } } private void drawRectangle(int x, int y, int width, int height, int color) { Gui.drawRect(x, y, x + width, y + height, color); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.