I'm making a custom options GUI like the one that's already in game. I looked at Notch/Jeb's code, and they have this for the buttons (With my changes in it)
Anytime I open the GUI, I crash, and I know this error doesn't help at all, but here it is:
at net.minecraft.src.PRGuiControls.initGui(PRGuiControls.java:20)
java.lang.NullPointerException
at net.minecraft.src.PRGuiControls.initGui(PRGuiControls.java:20)
at net.minecraft.src.GuiScreen.setWorldAndResolution(GuiScreen.java:145)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:699)
at net.minecraft.src.mod_PrecursorKeybind.isCharStat(mod_PrecursorKeybind.java:77)
at net.minecraft.src.mod_PrecursorKeybind.keyboardEvent(mod_PrecursorKeybind.java:62)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1165)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:722)
isCharStat, line 77 is mc.displayGuiScreen(new PRGuiControls());
keyboardEvent, line 62 is isCharStat(keybinding); which calls the method to display the GUI.
That did it, thanks
I'll add you to the credits of my mod for helping with this error
That's up to you. But anyways I'm gonna go to bed. Have fun modding, If you run into anymore problems feel free to ask. I also sit on IRC which might be a lot quick then on here if you need help faster.
Anytime I open the GUI, I crash, and I know this error doesn't help at all, but here it is:
at net.minecraft.src.PRGuiControls.initGui(PRGuiControls.java:20)
Line 20 of PRGuiControls is the for statement.
Can anyone help fix this?
-Muserae
mod_PrecursorKeybind
PRGuiControls
at net.minecraft.src.PRGuiControls.initGui(PRGuiControls.java:20)
at net.minecraft.src.GuiScreen.setWorldAndResolution(GuiScreen.java:145)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:699)
at net.minecraft.src.mod_PrecursorKeybind.isCharStat(mod_PrecursorKeybind.java:77)
at net.minecraft.src.mod_PrecursorKeybind.keyboardEvent(mod_PrecursorKeybind.java:62)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1165)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:722)
isCharStat, line 77 is mc.displayGuiScreen(new PRGuiControls());
keyboardEvent, line 62 is isCharStat(keybinding); which calls the method to display the GUI.
Try this.
Replace your old load with this one..
I'll add you to the credits of my mod for helping with this error
That's up to you. But anyways I'm gonna go to bed. Have fun modding, If you run into anymore problems feel free to ask. I also sit on IRC which might be a lot quick then on here if you need help faster.