-
Posts
796 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Kokkie
-
Look for something like GlStateManager.scale(...)
-
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
-
It is the right line, I triple checked, update my github, see for yourself
-
And it works in eclipse, and I have the same forge version
-
If you would just take a look....
-
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; }
-
Nah, it isn't the crosshair, it is a square that is like 1x1x1 pixel
-
I ment packets... it works now, thanks everyone!
-
No, how can I do that? Messages?
-
The bar I have made for it (see other threads for it) isn't getting more
-
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; } }
-
Isn't that only for server commands (ban, op etc.)?
-
Hello, how do I register commands?
-
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
-
But.... when I had it paused it still changed?!?! and now it doesn't work at all..?
-
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; }
-
But the event I'm using it in is located in my common event handler
-
How do I get the integrated server from a player?
-
I need it on the server side
-
It's because the website of it is down, you'll have to wait till it is online
-
Doesn't work, gives me a NullPointerException
-
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)?