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