So you mean where I have:
@SubscribeEvent
public void OnKeyInput(KeyInputEvent event)
{
if(!FMLClientHandler.instance().isGUIOpen(GuiChat.class))
{
if(Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed())
{
if(PlayerHandler.isJumping && !PlayerHandler.isDoubleJumping && PlayerHandler.canDoubleJump)
{
Minecraft.getMinecraft().thePlayer.setVelocity(0.0F, 0.5F, 0.0F);
Minecraft.getMinecraft().thePlayer.fallDistance = 0.0F;
PlayerHandler.isDoubleJumping = true;
}
}
}
}
because if I check for anything to do with the player here It crashes as soon as I jump again. That is basicly how I started it out, at first I had something like this in here:
public static boolean isDoubleJumping;
EntityPlayer EntityPlayer;
EntityPlayer player = EntityPlayer;
if(player.onground) {
isDoubleJumping = false;
}
@SubscribeEvent
public void OnKeyInput(KeyInputEvent event)
{
if(!FMLClientHandler.instance().isGUIOpen(GuiChat.class))
{
if(Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed())
{
if(!player.onground && !isDoubleJumping)
{
player.setVelocity(0.0F, 0.5F, 0.0F);
player.fallDistance = 0.0F;
isDoubleJumping = true;
}
}
}
}
But that just kept throwing errors at me so that's why I do it the other way now because that seemed to kind of work