void-esp module

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

1 implementationRender

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 ClientRendersrc/main/java/meteordevelopment/meteorclient/systems/modules/render/VoidESP.javaJava · 173 lines · 6.1 KB

Renders holes in bedrock layers that lead to the void.

Settingsair-onlyhorizontal-radiushole-heightnether-roofshape-modefill-colorline-color
VoidESP.javaJava · Minecraft 26.2 · 173 lines · 6.1 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.render;
7
8
import meteordevelopment.meteorclient.events.render.Render3DEvent;
9
import meteordevelopment.meteorclient.events.world.TickEvent;
10
import meteordevelopment.meteorclient.renderer.ShapeMode;
11
import meteordevelopment.meteorclient.settings.*;
12
import meteordevelopment.meteorclient.systems.modules.Categories;
13
import meteordevelopment.meteorclient.systems.modules.Module;
14
import meteordevelopment.meteorclient.utils.misc.Pool;
15
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
16
import meteordevelopment.meteorclient.utils.world.Dir;
17
import meteordevelopment.orbit.EventHandler;
18
import net.minecraft.core.BlockPos;
19
import net.minecraft.core.Direction;
20
import net.minecraft.world.level.block.Block;
21
import net.minecraft.world.level.block.Blocks;
22
import net.minecraft.world.level.chunk.ChunkAccess;
23
import net.minecraft.world.level.chunk.status.ChunkStatus;
24
import net.minecraft.world.level.dimension.BuiltinDimensionTypes;
25
26
import java.util.ArrayList;
27
import java.util.List;
28
29
public class VoidESP extends Module {
30
    private static final Direction[] SIDES = {Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.WEST};
31
32
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
33
    private final SettingGroup sgRender = settings.createGroup("Render");
34
35
    // General
36
37
    private final Setting<Boolean> airOnly = sgGeneral.add(new BoolSetting.Builder()
38
        .name("air-only")
39
        .description("Checks bedrock only for air blocks.")
40
        .defaultValue(false)
41
        .build()
42
    );
43
44
    private final Setting<Integer> horizontalRadius = sgGeneral.add(new IntSetting.Builder()
45
        .name("horizontal-radius")
46
        .description("Horizontal radius in which to search for holes.")
47
        .defaultValue(64)
48
        .min(0)
49
        .sliderMax(256)
50
        .build()
51
    );
52
53
    private final Setting<Integer> holeHeight = sgGeneral.add(new IntSetting.Builder()
54
        .name("hole-height")
55
        .description("The minimum hole height to be rendered.")
56
        .defaultValue(1)
57
        .min(1)
58
        .sliderRange(1, 5)
59
        .build()
60
    );
61
62
    private final Setting<Boolean> netherRoof = sgGeneral.add(new BoolSetting.Builder()
63
        .name("nether-roof")
64
        .description("Check for holes in nether roof.")
65
        .defaultValue(true)
66
        .build()
67
    );
68
69
    // Render
70
71
    private final Setting<ShapeMode> shapeMode = sgRender.add(new EnumSetting.Builder<ShapeMode>()
72
        .name("shape-mode")
73
        .description("How the shapes are rendered.")
74
        .defaultValue(ShapeMode.Both)
75
        .build()
76
    );
77
78
    private final Setting<SettingColor> sideColor = sgRender.add(new ColorSetting.Builder()
79
        .name("fill-color")
80
        .description("The color that fills holes in the void.")
81
        .defaultValue(new SettingColor(225, 25, 25, 50))
82
        .build()
83
    );
84
85
    private final Setting<SettingColor> lineColor = sgRender.add(new ColorSetting.Builder()
86
        .name("line-color")
87
        .description("The color to draw lines of holes to the void.")
88
        .defaultValue(new SettingColor(225, 25, 255))
89
        .build()
90
    );
91
92
    private final BlockPos.MutableBlockPos blockPos = new BlockPos.MutableBlockPos();
93
94
    private final Pool<Void> voidHolePool = new Pool<>(Void::new);
95
    private final List<Void> voidHoles = new ArrayList<>();
96
97
    public VoidESP() {
98
        super(Categories.Render, "void-esp", "Renders holes in bedrock layers that lead to the void.");
99
    }
100
101
    @EventHandler
102
    private void onTick(TickEvent.Post event) {
103
        voidHoles.clear();
104
        if (mc.level.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) return;
105
106
        int px = mc.player.blockPosition().getX();
107
        int pz = mc.player.blockPosition().getZ();
108
        int radius = horizontalRadius.get();
109
110
        for (int x = px - radius; x <= px + radius; x++) {
111
            for (int z = pz - radius; z <= pz + radius; z++) {
112
                blockPos.set(x, mc.level.getMinY(), z);
113
                if (isHole(blockPos, false))
114
                    voidHoles.add(voidHolePool.get().set(blockPos.set(x, mc.level.getMinY(), z), false));
115
116
                // Check for nether roof
117
                if (netherRoof.get() && mc.level.dimensionTypeRegistration().is(BuiltinDimensionTypes.NETHER)) {
118
                    blockPos.set(x, 127, z);
119
                    if (isHole(blockPos, true)) voidHoles.add(voidHolePool.get().set(blockPos.set(x, 127, z), true));
120
                }
121
            }
122
        }
123
    }
124
125
    @EventHandler
126
    private void onRender(Render3DEvent event) {
127
        for (Void voidHole : voidHoles) voidHole.render(event);
128
    }
129
130
    private boolean isBlockWrong(BlockPos blockPos) {
131
        ChunkAccess chunk = mc.level.getChunk(blockPos.getX() >> 4, blockPos.getZ() >> 4, ChunkStatus.FULL, false);
132
        if (chunk == null) return true;
133
134
        Block block = chunk.getBlockState(blockPos).getBlock();
135
136
        if (airOnly.get()) return block != Blocks.AIR;
137
        return block == Blocks.BEDROCK;
138
    }
139
140
    private boolean isHole(BlockPos.MutableBlockPos blockPos, boolean nether) {
141
        for (int i = 0; i < holeHeight.get(); i++) {
142
            blockPos.setY(nether ? 127 - i : mc.level.getMinY() + i);
143
            if (isBlockWrong(blockPos)) return false;
144
        }
145
146
        return true;
147
    }
148
149
    private class Void {
150
        private int x, y, z;
151
        private int excludeDir;
152
153
        public Void set(BlockPos.MutableBlockPos blockPos, boolean nether) {
154
            x = blockPos.getX();
155
            y = blockPos.getY();
156
            z = blockPos.getZ();
157
158
            excludeDir = 0;
159
160
            for (Direction side : SIDES) {
161
                blockPos.set(x + side.getStepX(), y, z + side.getStepZ());
162
                if (isHole(blockPos, nether)) excludeDir |= Dir.get(side);
163
            }
164
165
            return this;
166
        }
167
168
        public void render(Render3DEvent event) {
169
            event.renderer.box(x, y, z, x + 1, y + 1, z + 1, sideColor.get(), lineColor.get(), shapeMode.get(), excludeDir);
170
        }
171
    }
172
}
173