Posted July 15, 201312 yr I am trying to make a feature in my mod where when the player presses the jump button they can fly up, how do I get the jump button? I'm trying to put the finished code in a tick handler, am I in the right place and how would I get the minecraft gamesettings?
July 15, 201312 yr Only client-side: GameSettings settings = Minecraft.getMinecraft().gameSettings; KeyBinding jump = settings.keyBindJump;
July 16, 201312 yr Author How do I get the Minecraft variable? I found that, but I'm not sure how to get the minecraft variable
July 16, 201312 yr Minecraft is not a variable, it is a class. getMinecraft() will return the running instance of the client which is a field.
July 16, 201312 yr Author Minecraft is not a variable, it is a class. getMinecraft() will return the running instance of the client which is a field. Just put that wherever? It doesn't seem to work in my tick handler. Looks like we can get the minecraft server from world, but I'm not sure about the client.
July 16, 201312 yr Make sure your tick handler is Client side, and Minecraft.getMinecraft() will work fine.
July 16, 201312 yr Author Make sure your tick handler is Client side, and Minecraft.getMinecraft() will work fine. That was quite anticlimactic, thanks! =D
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.