Compare commits
2 Commits
2b807d8428
...
7f6b4e3520
Author | SHA1 | Date | |
---|---|---|---|
7f6b4e3520 | |||
50a6224fa8 |
@ -12,30 +12,17 @@ public class FallDamageCancel {
|
||||
private static final int triggerHeight = 4;
|
||||
private static final float heightAdjust = 0.5f;
|
||||
|
||||
// private static boolean triggered = false;
|
||||
|
||||
public static void tick(MinecraftClient client) {
|
||||
if (!options.cancel_fall_damage || client.world == null || client.player == null)
|
||||
if (!options.cancel_fall_damage || client.world == null || client.player == null || client.player.isOnGround())
|
||||
return;
|
||||
|
||||
if (client.player.isOnGround()) {
|
||||
// triggered = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// if (triggered) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
BlockPos playerPos = client.player.getBlockPos();
|
||||
|
||||
for (int i = 0; i < triggerHeight; i++) {
|
||||
if (!client.world.getBlockState(playerPos.down(i)).isAir()) {
|
||||
float totalFallDist = client.player.fallDistance + i;
|
||||
if (totalFallDist >= client.player.getSafeFallDistance()) {
|
||||
System.out.println("Attempting to negate fall damage");
|
||||
sendPacket(client);
|
||||
// triggered = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class FlyHack {
|
||||
}
|
||||
}
|
||||
|
||||
public static void fakeFall(MinecraftClient client) {
|
||||
private static void fakeFall(MinecraftClient client) {
|
||||
if (client.player == null)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user