improve fall damage mitigations
All checks were successful
/ Build BaseBand (push) Successful in 2m59s

This commit is contained in:
Daniella / Tove 2024-10-04 22:28:13 +02:00
parent 4f451d8551
commit bebe8f82ad
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -124,6 +124,7 @@ public class ElytraFly extends Feature {
else {
// stop fall dmg
mc.player.connection.sendPacket(new CPacketPlayer.Rotation(mc.player.rotationYaw, 0, false));
mc.player.rotationPitch = 0;
mc.player.motionY = 0.1;
sendDisableTimer = ServerDataManager.timeToSurelyTicked();
// use NoFall setting if that's enabled, since the player might prefer something else
@ -141,14 +142,14 @@ public class ElytraFly extends Feature {
@Override
public void onEveryTick() {
if(sendDisableTimer > 0) {
mc.player.motionY = 0.1;
sendDisableTimer--;
}
if(sendDisableTimer == 0) {
sendDisablePackets();
sendDisableTimer = -1;
}
if(sendDisableTimer > 0) {
mc.player.motionY = 0.1;
sendDisableTimer--;
}
if (blockMovement) {
meta = "Locked";
} else {