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