Hi.. i tryied it and it didn't work it crashes when i connect to singleplayer world.
This is my code :
@SubscribeEvent
public void onLivingUpdateEvent(LivingUpdateEvent event, EntityPlayer player, Entity entity)
{
if(entity instanceof EntityPlayer)
{
updateMS();
mc.thePlayer.motionX = 0;
mc.thePlayer.motionY = 0;
mc.thePlayer.motionZ = 0;
mc.thePlayer.jumpMovementFactor = speed;
if(KeyInputHandler.leJoueurVole == true)
{
updateFlyHeight();
mc.thePlayer.sendQueue
.addToSendQueue(new C03PacketPlayer(true));
if(flyHeight <= 290 && hasTimePassedM(500) || flyHeight > 290
&& hasTimePassedM(100))
{
goToGround();
System.out.println("Test.");
updateLastMS();
}
}
}
}
what im i doing wrong ?
ps : i'm not tying to stop the player from flying.
(sorry for bad language)