Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kokkie

Forge Modder
  • Joined

  • Last visited

Everything posted by Kokkie

  1. It is yes..? Now the whole button is gone?!?! WHAT?!?! Okay, now the whole button is gone, and the Done button still moves place, like in the code and the code is not being ran (the init gui event, checked by printing in console), code is the same as before..?
  2. That's because the Tile-Entity only gets updated after you use it, so you need to put it in the blocks class
  3. Have you made sure it only spawns on client? (if (world.isRemote) { spawn })
  4. It doesn't :'(
  5. Client handler @SubscribeEvent public void onGuiPreInit(GuiScreenEvent.InitGuiEvent.Pre event) { GuiScreen gui = event.getGui(); if (gui instanceof GuiCreateWorld) { List<GuiButton> buttonList = event.getButtonList(); GuiButton giveItem; giveItem = addButton(new GuiButton(11, gui.width / 2 + 5, 187, 150, 20, "Give Items: OFF"), buttonList); giveItem.visible = false; } } protected <T extends GuiButton> T addButton(GuiButton button, List<GuiButton> list) { list.add(button); return (T) button; } @SubscribeEvent public void onGuiPreInteraction(GuiScreenEvent.ActionPerformedEvent.Pre event) { GuiScreen gu = event.getGui(); if (gu instanceof GuiCreateWorld) { GuiCreateWorld gui = (GuiCreateWorld) gu; GuiButton button = event.getButton(); if (button.id == 2) { for (int i = 0; i < event.getButtonList().size(); i++) { GuiButton button1 = event.getButtonList().get(i); if (button1.id == 11) { if ("survival".equals(CheeseUtils.getField(GuiCreateWorld.class, gui, "gameMode"))) { ShouldGiveItems.worldCreateGive = false; button1.enabled = false; } else if ("hardcore".equals(CheeseUtils.getField(GuiCreateWorld.class, gui, "gameMode"))) { ShouldGiveItems.worldCreateGive = false; button1.enabled = true; } else { ShouldGiveItems.worldCreateGive = false; button1.enabled = true; } } } } else if (button.id == 3) { for (int i = 0; i < event.getButtonList().size(); i++) { GuiButton button1 = event.getButtonList().get(i); if (button1.id == 11) { button1.visible = !(Boolean) CheeseUtils.getField(GuiCreateWorld.class, gui, "inMoreWorldOptionsDisplay"); } else if (button1.id == 3) { if (!(Boolean) CheeseUtils.getField(GuiCreateWorld.class, gui, "inMoreWorldOptionsDisplay")) { button1.xPosition = gui.width / 2 - 155; } else { button1.xPosition = gui.width / 2 - 75; } } } } else if (button.id == 11) { if (!ShouldGiveItems.worldCreateGive) { button.displayString = "Give Items: ON"; ShouldGiveItems.worldCreateGive = true; } else { button.displayString = "Give Items: OFF"; ShouldGiveItems.worldCreateGive = false; } } } }
  6. Just to clarify: change BlockFurnace.setState(...) to WonkaFurnace.setState(...)
  7. So, I've now got it all working, but when I resize the screen while the gui is up, my button disappears and only reappears when I 'reload' the screen Anyone knows how to fix this?
  8. So.. where do I put it?
  9. Do you know a global variable that I can use?
  10. What do you mean with a global variable?
  11. So I've got the capabilitys, now how do I set the world capability to whatever I set in the world options?
  12. https://github.com/seanrowens/oObjLoader
  13. It works, thanks!
  14. I want to add 2 capabilitys, both are booleans and the first is tied to a world, if there was a setting set or not, and the other is tied to players/entities, if they have already had items or not, for more detail look at this: http://www.minecraftforge.net/forum/index.php?topic=44222.0
  15. Hello, how can I add a capability?
  16. OOH, Thanks!!!
  17. No, I see where you're going, 'just use a resourcepack then', I'm making this mod for someone and I don't want him to have to download a resourcepack And if my mod gets famous Won't happen but still then I also don't want to let everyone also download a resourcepack
  18. No, well sort of, let's just say no
  19. I know, but can I change it in the code?
  20. BTW: only for players
  21. Hello, I want to change the texture of the elytra, but for that I need to stop rendering the vanilla Elytra layer
  22. I don't think this is a modder support thing, because this board is for if you have a problem with code
  23. It's probably something with the code. OMG I LAUGHED SO HARD
  24. Okay, I'll try

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.