Posted September 16, 20178 yr I've registered my Event Handler and it does print "#!#" as expected but the button just isn't there. Here's my event class: public class EventHandler { @SubscribeEvent public void onGuiInit(InitGuiEvent.Pre event) { if(event.getGui() instanceof GuiIngameMenu) { // Make sure GUI is Escape menu System.out.println("#!#"); GuiButton button = new GuiButton(43, Minecraft.getMinecraft().displayWidth / 4, Minecraft.getMinecraft().displayHeight / 4, "Music"); event.getButtonList().add(button); } } @SubscribeEvent public void onGuiActionPerformed(ActionPerformedEvent event) { if(event.getGui() instanceof GuiIngameMenu && event.getButton().id == 43) { //Confirm my button was pressed //Open new GUI here } } } Yet when I open it up and hit esc, it prints #!# but fails to show any button in existence. All Projects found here: Website Main Programmer for: Better Animals Plus, Better Animal Models Created independently: QuickHomes, ClaimIt, ClaimIt API, CloneLand, DerpCats, QuickTeleports, QuickSpawns, MCMusicPlayer, MCDevDate, [SBM] Fluid Gun, OpenScreens Work on/Contribute to: Bewitchment Commissioned for: [SBM] Breadstone, [SBM] Infinite Falling, [SBM] Dead Man's Satchel, [SBM] Handheld Piston
September 16, 20178 yr What happens when you use GuiButtonExt instead of GuiButton? Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
September 16, 20178 yr Author Just now, Kokkie said: What happens when you use GuiButtonExt instead of GuiButton? same thing, i tried GuiButtonExt. All Projects found here: Website Main Programmer for: Better Animals Plus, Better Animal Models Created independently: QuickHomes, ClaimIt, ClaimIt API, CloneLand, DerpCats, QuickTeleports, QuickSpawns, MCMusicPlayer, MCDevDate, [SBM] Fluid Gun, OpenScreens Work on/Contribute to: Bewitchment Commissioned for: [SBM] Breadstone, [SBM] Infinite Falling, [SBM] Dead Man's Satchel, [SBM] Handheld Piston
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.