diff options
| author | Arslaan Pathan <[email protected]> | 2026-09-26 17:05:36 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-09-26 17:05:36 +1200 |
| commit | 14c68eb5ba16774f581d95a39e64a7b303954ffc (patch) | |
| tree | 2888ef11f47c6a639d440300ef580c247ad1bcb1 /src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java | |
| parent | 766ba1c1d977442332cadaaeca93d795baa559df (diff) | |
| download | arslaansmagichax-14c68eb5ba16774f581d95a39e64a7b303954ffc.tar.xz arslaansmagichax-14c68eb5ba16774f581d95a39e64a7b303954ffc.zip | |
migration to 26.2 - run migrateMappings with old loom then bring it back to new
Diffstat (limited to 'src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java')
| -rw-r--r-- | src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java b/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java new file mode 100644 index 0000000..f1c1bbb --- /dev/null +++ b/src/main/java/com/arslaancodes/arslaansmagichax/modules/impl/Jetpack.java @@ -0,0 +1,32 @@ +package com.arslaancodes.arslaansmagichax.modules.impl; + +import com.arslaancodes.arslaansmagichax.modules.Category; +import com.arslaancodes.arslaansmagichax.modules.Module; +import com.arslaancodes.arslaansmagichax.modules.settings.NumberSetting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.phys.Vec3; + +public class Jetpack extends Module { + private NumberSetting speed = new NumberSetting("Thrust Speed", 1, 10, 1, 1); + + public Jetpack() { + super("Jetpack", "Turns your jump key into a jetpack.", -1, Category.MOVEMENT); + addSetting(speed); + } + + @Override + protected void onEnable() { + if (mc.player == null) return; + mc.player.displayClientMessage(Component.literal("[Jetpack] It is recommended to use this hack in combination with NoFall."), false); + } + + @Override + public void tick() { + if (!this.isEnabled() || mc.player == null) return; + + if (mc.options.keyJump.isDown()) { + mc.player.setDeltaMovement(new Vec3(mc.player.getDeltaMovement().x, 0.42 * speed.getValue(), mc.player.getDeltaMovement().z)); + mc.player.fallDistance = 0; + } + } +} |
