reverse-step module

reverse-step: Minecraft 26.3 cheat module, full source for every implementation (1 client: Meteor Client).

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.

Meteor ClientMovementsrc/main/java/meteordevelopment/meteorclient/systems/modules/movement/ReverseStep.javaJava · 99 lines · 3.9 KB

Allows you to fall down blocks at a greater speed.

Settingsfall-speedfall-distancevehicles
ReverseStep.javaJava · Minecraft 26.2 · 99 lines · 3.9 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
3
 * Copyright (c) Meteor Development.
4
 */
5
6
package meteordevelopment.meteorclient.systems.modules.movement;
7
8
import meteordevelopment.meteorclient.events.world.TickEvent;
9
import meteordevelopment.meteorclient.mixininterface.IVec3;
10
import meteordevelopment.meteorclient.settings.BoolSetting;
11
import meteordevelopment.meteorclient.settings.DoubleSetting;
12
import meteordevelopment.meteorclient.settings.Setting;
13
import meteordevelopment.meteorclient.settings.SettingGroup;
14
import meteordevelopment.meteorclient.systems.modules.Categories;
15
import meteordevelopment.meteorclient.systems.modules.Module;
16
import meteordevelopment.orbit.EventHandler;
17
import net.minecraft.core.BlockPos;
18
import net.minecraft.world.entity.Entity;
19
import net.minecraft.world.level.block.BedBlock;
20
21
public class ReverseStep extends Module {
22
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
23
24
    private final Setting<Double> fallSpeed = sgGeneral.add(new DoubleSetting.Builder()
25
        .name("fall-speed")
26
        .description("How fast to fall in blocks per second.")
27
        .defaultValue(3)
28
        .min(0)
29
        .build()
30
    );
31
32
    private final Setting<Double> fallDistance = sgGeneral.add(new DoubleSetting.Builder()
33
        .name("fall-distance")
34
        .description("The maximum fall distance this setting will activate at.")
35
        .defaultValue(3)
36
        .min(0)
37
        .build()
38
    );
39
40
    private final Setting<Boolean> vehicles = sgGeneral.add(new BoolSetting.Builder()
41
        .name("vehicles")
42
        .description("Whether or not reverse step should affect vehicles.")
43
        .defaultValue(false)
44
        .build()
45
    );
46
47
    public ReverseStep() {
48
        super(Categories.Movement, "reverse-step", "Allows you to fall down blocks at a greater speed.");
49
    }
50
51
    @EventHandler
52
    private void onTick(TickEvent.Post event) {
53
        Entity vehicle = mc.player.getVehicle();
54
        if (vehicle != null && vehicles.get()) {
55
            if (canSnap(vehicle)) {
56
                ((IVec3) vehicle.getDeltaMovement()).meteor$setY(-fallSpeed.get());
57
            }
58
        } else {
59
            if (mc.player.isSuppressingSlidingDownLadder() || mc.player.zza == 0 && mc.player.xxa == 0) return;
60
            if (!isOnBed() && canSnap(mc.player)) {
61
                ((IVec3) mc.player.getDeltaMovement()).meteor$setY(-fallSpeed.get());
62
            }
63
        }
64
    }
65
66
    private boolean canSnap(Entity entity) {
67
        if (!entity.onGround() || entity.isUnderWater() || entity.isInLava() || mc.options.keyJump.isDown() || entity.noPhysics)
68
            return false;
69
        return !mc.level.noCollision(entity.getBoundingBox().move(0.0, (float) -(fallDistance.get() + 0.01), 0.0));
70
    }
71
72
    private boolean isOnBed() {
73
        BlockPos.MutableBlockPos blockPos = mc.player.blockPosition().mutable();
74
75
        if (check(blockPos, 0, 0)) return true;
76
77
        double xa = mc.player.getX() - blockPos.getX();
78
        double za = mc.player.getZ() - blockPos.getZ();
79
80
        if (xa >= 0 && xa <= 0.3 && check(blockPos, -1, 0)) return true;
81
        if (xa >= 0.7 && check(blockPos, 1, 0)) return true;
82
        if (za >= 0 && za <= 0.3 && check(blockPos, 0, -1)) return true;
83
        if (za >= 0.7 && check(blockPos, 0, 1)) return true;
84
85
        if (xa >= 0 && xa <= 0.3 && za >= 0 && za <= 0.3 && check(blockPos, -1, -1)) return true;
86
        if (xa >= 0 && xa <= 0.3 && za >= 0.7 && check(blockPos, -1, 1)) return true;
87
        if (xa >= 0.7 && za >= 0 && za <= 0.3 && check(blockPos, 1, -1)) return true;
88
        return xa >= 0.7 && za >= 0.7 && check(blockPos, 1, 1);
89
    }
90
91
    private boolean check(BlockPos.MutableBlockPos blockPos, int x, int z) {
92
        blockPos.move(x, 0, z);
93
        boolean is = mc.level.getBlockState(blockPos).getBlock() instanceof BedBlock;
94
        blockPos.move(-x, 0, -z);
95
96
        return is;
97
    }
98
}
99