anti-void module

anti-void: 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/AntiVoid.javaJava · 73 lines · 2.3 KB

Attempts to prevent you from falling into the void.

Settingsmode
AntiVoid.javaJava · Minecraft 26.2 · 73 lines · 2.3 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.settings.EnumSetting;
10
import meteordevelopment.meteorclient.settings.Setting;
11
import meteordevelopment.meteorclient.settings.SettingGroup;
12
import meteordevelopment.meteorclient.systems.modules.Categories;
13
import meteordevelopment.meteorclient.systems.modules.Module;
14
import meteordevelopment.meteorclient.systems.modules.Modules;
15
import meteordevelopment.meteorclient.utils.Utils;
16
import meteordevelopment.orbit.EventHandler;
17
18
public class AntiVoid extends Module {
19
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
20
21
    private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
22
        .name("mode")
23
        .description("The method to prevent you from falling into the void.")
24
        .defaultValue(Mode.Jump)
25
        .onChanged(_ -> onActivate())
26
        .build()
27
    );
28
29
    private boolean wasFlightEnabled, hasRun;
30
31
    public AntiVoid() {
32
        super(Categories.Movement, "anti-void", "Attempts to prevent you from falling into the void.");
33
    }
34
35
    @Override
36
    public void onActivate() {
37
        if (mode.get() == Mode.Flight) wasFlightEnabled = Modules.get().isActive(Flight.class);
38
    }
39
40
    @Override
41
    public void onDeactivate() {
42
        if (!wasFlightEnabled && mode.get() == Mode.Flight && Utils.canUpdate()) {
43
            Modules.get().get(Flight.class).disable();
44
        }
45
    }
46
47
    @EventHandler
48
    private void onPreTick(TickEvent.Pre event) {
49
        int minY = mc.level.getMinY();
50
51
        if (mc.player.getY() > minY || mc.player.getY() < minY - 15) {
52
            if (hasRun && mode.get() == Mode.Flight) {
53
                Modules.get().get(Flight.class).disable();
54
                hasRun = false;
55
            }
56
            return;
57
        }
58
59
        switch (mode.get()) {
60
            case Flight -> {
61
                Modules.get().get(Flight.class).enable();
62
                hasRun = true;
63
            }
64
            case Jump -> mc.player.jumpFromGround();
65
        }
66
    }
67
68
    public enum Mode {
69
        Flight,
70
        Jump
71
    }
72
}
73