I would like to see the a RenderHUDEvent that allows you to draw on the players in-game screen. I know there are methods which makes this possible but once you open a GUI it renders over that GUI as well. With a RenderHUDEvent your renders will render behind Gui's. See code below for implementation.
package net.minecraftforge.client.event;
import net.minecraft.client.Minecraft;
import net.minecraftforge.event.Event;
public class RenderHUDEvent extends Event {
public final Minecraft mc;
public final float partialTick;
public final boolean guiOpen;
public final int mouseX;
public final int mouseY;
public RenderHUDEvent(Minecraft mc, float partialTick, boolean guiOpen, int mouseX, int mouseY) {
this.mc = mc;
this.partialTick = partialTick;
this.guiOpen = guiOpen;
this.mouseX = mouseX;
this.mouseY = mouseY;
}
}
GuiIngame.java
if (this.mc.playerController.func_78763_f() && this.mc.thePlayer.experienceLevel > 0)
{
this.mc.mcProfiler.startSection("expLevel");
flag1 = false;
i1 = flag1 ? 16777215 : 8453920;
String s = "" + this.mc.thePlayer.experienceLevel;
j5 = (k - fontrenderer.getStringWidth(s)) / 2;
k5 = l - 31 - 4;
fontrenderer.drawString(s, j5 + 1, k5, 0);
fontrenderer.drawString(s, j5 - 1, k5, 0);
fontrenderer.drawString(s, j5, k5 + 1, 0);
fontrenderer.drawString(s, j5, k5 - 1, 0);
fontrenderer.drawString(s, j5, k5, i1);
this.mc.mcProfiler.endSection();
}
MinecraftForge.EVENT_BUS.post(new RenderHUDEvent(this.mc, par1, par2, par3, par4));
String s1;
if (this.mc.gameSettings.heldItemTooltips)
{
this.mc.mcProfiler.startSection("toolHighlight");
if (this.field_92017_k > 0 && this.field_92016_l != null)
{
With use of Render Tick:
With use of RenderHUDEvent: