Hello everyone,
I'm trying to create an overlay mod. I'm pretty much at the beginning of it and I'm trying to understand how rendering and gui-classes works.
My goal is a pretty simple overlay that shows a current state of an item i already created. (goal -> somewhat like the energy level of the ultimate lappack from the GraviChestPlate MOD)
I'm trying to render a string onto the screen with the FontRenderer - drawString method. I pretty much copied it together from the GuiIngame class.
GUI class
@SideOnly(Side.CLIENT)
public class GuiMasterWrench extends Gui {
private final Minecraft mc;
public GuiMasterWrench(Minecraft minecraft) {
this.mc = minecraft;
}
public void renderWrenchState() {
FontRenderer fontRender = this.mc.fontRenderer;
ScaledResolution sclRes = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
//GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
fontRender.drawStringWithShadow("This is the test string!", 1, 1, 0xffffffff);
}
}
In the item class I'm trying to call the overlay with the onItemUseFirst method.
When i try to right-click my item ingame, i get the following error.
Error - Stack Trace
I would appreciate any kind of help.