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. Kokkie replied to Xawolf's topic in Modder Support
    Look for something like GlStateManager.scale(...)
  2. Where can I find the srg name? Also, how can I use the srg name in real minecraft, and use the other name in eclipse
  3. It is the right line, I triple checked, update my github, see for yourself
  4. And it works in eclipse, and I have the same forge version
  5. If you would just take a look....
  6. Hello, my minecraft crashes when I try it in the real launcher, crash: [17:33:41] [Client thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.client.event.GuiScreenEvent$InitGuiEvent$Post@df6cc57: java.lang.NullPointerException at com.Egietje.degeweldigemod.handler.CheeseClientHandler.onGuiPostInit(CheeseClientHandler.java:101) ~[CheeseClientHandler.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_11_CheeseClientHandler_onGuiPostInit_Post.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) [EventBus.class:?] at net.minecraft.client.gui.GuiScreen.func_146280_a(GuiScreen.java:489) [bho.class:?] at net.minecraft.client.Minecraft.func_147108_a(Minecraft.java:966) [bes.class:?] at net.minecraft.client.gui.GuiWorldSelection.func_146284_a(SourceFile:85) [bka.class:?] at net.minecraft.client.gui.GuiScreen.func_73864_a(GuiScreen.java:452) [bho.class:?] at net.minecraft.client.gui.GuiWorldSelection.func_73864_a(SourceFile:116) [bka.class:?] at net.minecraft.client.gui.GuiScreen.func_146274_d(GuiScreen.java:542) [bho.class:?] at net.minecraft.client.gui.GuiWorldSelection.func_146274_d(SourceFile:49) [bka.class:?] at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:510) [bho.class:?] at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1695) [bes.class:?] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1056) [bes.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:372) [bes.class:?] at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Client handler: @SubscribeEvent public void onGuiPostInit(GuiScreenEvent.InitGuiEvent.Post 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); LINE 101 giveItem.visible = (Boolean) CheeseUtils.getField(GuiCreateWorld.class, gui, "inMoreWorldOptionsDisplay"); for (int i = 0; i < buttonList.size(); i++) { GuiButton button = event.getButtonList().get(i); if (button.id == 3) { if ((Boolean) CheeseUtils.getField(GuiCreateWorld.class, gui, "inMoreWorldOptionsDisplay")) { button.xPosition = gui.width / 2 - 155; } else { button.xPosition = gui.width / 2 - 75; } } } } } protected <T extends GuiButton> T addButton(T button, List<GuiButton> list) { list.add(button); return button; }
  7. Nah, it isn't the crosshair, it is a square that is like 1x1x1 pixel
  8. I ment packets... it works now, thanks everyone!
  9. No, how can I do that? Messages?
  10. The bar I have made for it (see other threads for it) isn't getting more
  11. The capability isn't updating, the code: public class FillCheese extends CommandBase { @Override public String getName() { return "fillcheese"; } @Override public String getUsage(ICommandSender sender) { return "commands.fillcheese.usage"; } @Override public int getRequiredPermissionLevel() { return 2; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length > 0) { throw new WrongUsageException("commands.fillcheese.usage", new Object[0]); } else { Entity entity = sender.getCommandSenderEntity(); if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; ICheese cheese = player.getCapability(CheeseProvider.CHEESE_CAP, null); cheese.set(20); notifyCommandListener(sender, this, "commands.fillcheese.succes", new Object[] { player.getDisplayName() }); } } } @Override public boolean isUsernameIndex(String[] args, int index) { return index == 0; } }
  12. Isn't that only for server commands (ban, op etc.)?
  13. Hello, how do I register commands?
  14. So, it didn't work because of the isDedicatedServer boolean, I'll just not check for if the world is paused... Now it doesn't update when paused?!?!? Well.. ok
  15. But.... when I had it paused it still changed?!?! and now it doesn't work at all..?
  16. I now have this: @SubscribeEvent public void onPlayerTick(PlayerTickEvent event) { EntityPlayer player = event.player; ICheese cheese = player.getCapability(CheeseProvider.CHEESE_CAP, null); Random random = new Random(); World world = player.world; if (!world.isRemote) { MinecraftServer server = player.getServer(); if (!server.isDedicatedServer()) { boolean isGamePaused = DeGeweldigeMod.proxy.isGamePaused(); if (random.nextInt(100) == 0 && !player.isCreative() && world.getWorldInfo().getDifficulty() != EnumDifficulty.PEACEFUL && world.getBiome(player.getPosition()) != CheeseBiomes.CHEESE_BIOME && !isGamePaused) { cheese.remove(1); } if (cheese.get() <= 0 && random.nextInt(25) == 0 && !player.isCreative() && world.getWorldInfo().getDifficulty() != EnumDifficulty.PEACEFUL && world.getBiome(player.getPosition()) != CheeseBiomes.CHEESE_BIOME && !isGamePaused) { player.attackEntityFrom(DamageSource.STARVE, 1.5F); cheese.set(0); } if (world.getWorldInfo().getDifficulty() == EnumDifficulty.PEACEFUL && random.nextInt(5) == 0 && !isGamePaused) { cheese.add(random.nextInt(2)); } } } } But now it doesn't remove anything... my proxys: Client public boolean isGamePaused() { IntegratedServer server = Minecraft.getMinecraft().getIntegratedServer(); return (Boolean) CheeseUtils.getField(IntegratedServer.class, server, "isGamePaused"); } Common public boolean isGamePaused() { return false; }
  17. But the event I'm using it in is located in my common event handler
  18. How do I get the integrated server from a player?
  19. I need it on the server side
  20. It's because the website of it is down, you'll have to wait till it is online
  21. Doesn't work, gives me a NullPointerException
  22. Hello, is there a way to check if the world a player is in is paused or not (for example if the game menu is up, and it isn't on a server)?

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.