HoleAnchor module

HoleAnchor: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationMOVEMENT

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)MOVEMENTsrc/main/java/thunder/hack/features/modules/movement/HoleAnchor.javaJava · 47 lines · 2.2 KB

Stops movement while above the safe hole.

SettingsPitchPull
HoleAnchor.javaJava · Minecraft 26.2 · 47 lines · 2.2 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.movement;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.world.phys.Vec3;
6
import thunder.hack.events.impl.PlayerUpdateEvent;
7
import thunder.hack.features.modules.Module;
8
import thunder.hack.setting.Setting;
9
10
import static thunder.hack.utility.world.HoleUtility.validIndestructible;
11
import static thunder.hack.utility.world.HoleUtility.validTwoBlockIndestructible;
12
13
public class HoleAnchor extends Module {
14
    public HoleAnchor() {
15
        super("HoleAnchor", Category.MOVEMENT);
16
    }
17
18
    private final Setting<Integer> pitch = new Setting<>("Pitch", 60, 0, 90);
19
    private final Setting<Boolean> pull = new Setting<>("Pull", true);
20
21
    @EventHandler
22
    public void onPlayerUpdate(PlayerUpdateEvent e) {
23
        if (mc.player.getXRot() > pitch.getValue()) {
24
            if (
25
                    validIndestructible(BlockPos.containing(mc.player.position()).below(1))
26
                            || validIndestructible(BlockPos.containing(mc.player.position()).below(2))
27
                            || validIndestructible(BlockPos.containing(mc.player.position()).below(3))
28
                            || validTwoBlockIndestructible(BlockPos.containing(mc.player.position()).below(1))
29
                            || validTwoBlockIndestructible(BlockPos.containing(mc.player.position()).below(2))
30
                            || validTwoBlockIndestructible(BlockPos.containing(mc.player.position()).below(3))
31
            ) {
32
                if (!pull.getValue()) {
33
                    mc.player.setDeltaMovement(0, mc.player.getDeltaMovement().y(), 0);
34
                } else {
35
                    Vec3 center = new Vec3(Math.floor(mc.player.getX()) + 0.5, Math.floor(mc.player.getY()), Math.floor(mc.player.getZ()) + 0.5);
36
37
                    if (Math.abs(center.x - mc.player.getX()) > 0.1 || Math.abs(center.z - mc.player.getZ()) > 0.1) {
38
                        double d3 = center.x - mc.player.getX();
39
                        double d4 = center.z - mc.player.getZ();
40
                        mc.player.setDeltaMovement(Math.min(d3 / 2.0, 0.2), mc.player.getDeltaMovement().y(), Math.min(d4 / 2.0, 0.2));
41
                    }
42
                }
43
            }
44
        }
45
    }
46
}
47