diff options
Diffstat (limited to 'src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/NoFall.java')
| -rw-r--r-- | src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/NoFall.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/NoFall.java b/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/NoFall.java new file mode 100644 index 0000000..927b435 --- /dev/null +++ b/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/NoFall.java @@ -0,0 +1,25 @@ +package com.arslaancodes.arslaansmagichax.modules.impl; + +import com.arslaancodes.arslaansmagichax.modules.Category; +import com.arslaancodes.arslaansmagichax.modules.Module; +import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket; + +public class NoFall extends Module { + public NoFall() { + super("NoFall", "Negates fall damage.", -1, Category.PLAYER); + } + + @Override + public void tick() { + if (this.isEnabled()) { + if (mc.player != null) { + if (!mc.player.onGround() && mc.player.fallDistance > 3) { + // magic hax + ServerboundMovePlayerPacket packet = new ServerboundMovePlayerPacket.PosRot(mc.player.getX(), mc.player.getY() + 0.000000001, mc.player.getZ(), + mc.player.getYRot(), mc.player.getXRot(), false, mc.player.horizontalCollision); + mc.player.connection.send(packet); + } + } + } + } +} |
