Compare commits

..

No commits in common. "7f6b4e35205ec7558ec4f327de3f697fcfff4aa4" and "2b807d842806e9fe5aa32e6e4df91b65165dde2e" have entirely different histories.

2 changed files with 15 additions and 2 deletions

View File

@ -12,17 +12,30 @@ 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 || client.player.isOnGround())
if (!options.cancel_fall_damage || client.world == null || client.player == null)
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;
}
}
}

View File

@ -34,7 +34,7 @@ public class FlyHack {
}
}
private static void fakeFall(MinecraftClient client) {
public static void fakeFall(MinecraftClient client) {
if (client.player == null)
return;