reach module

reach: Minecraft 26.3 cheat module, full source for every implementation (5 clients: Meteor Client, MelaHack (ThunderHack fork), OfflineClient, …).

5 implementationsPlayerCOMBATPLAYER

Full module source: 5 implementations

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

Meteor ClientPlayersrc/main/java/meteordevelopment/meteorclient/systems/modules/player/Reach.javaJava · 52 lines · 1.9 KB

Gives you super long arms.

Settingsextra-block-reachextra-entity-reach
Reach.javaJava · Minecraft 26.2 · 52 lines · 1.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.player;
7
8
import meteordevelopment.meteorclient.gui.GuiTheme;
9
import meteordevelopment.meteorclient.gui.widgets.WWidget;
10
import meteordevelopment.meteorclient.settings.DoubleSetting;
11
import meteordevelopment.meteorclient.settings.Setting;
12
import meteordevelopment.meteorclient.settings.SettingGroup;
13
import meteordevelopment.meteorclient.systems.modules.Categories;
14
import meteordevelopment.meteorclient.systems.modules.Module;
15
import meteordevelopment.meteorclient.utils.Utils;
16
17
public class Reach extends Module {
18
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
19
20
    private final Setting<Double> blockReach = sgGeneral.add(new DoubleSetting.Builder()
21
        .name("extra-block-reach")
22
        .description("The distance to add to your block reach.")
23
        .sliderMax(1)
24
        .build()
25
    );
26
27
    private final Setting<Double> entityReach = sgGeneral.add(new DoubleSetting.Builder()
28
        .name("extra-entity-reach")
29
        .description("The distance to add to your entity reach.")
30
        .sliderMax(1)
31
        .build()
32
    );
33
34
    public Reach() {
35
        super(Categories.Player, "reach", "Gives you super long arms.");
36
    }
37
38
    @Override
39
    public WWidget getWidget(GuiTheme theme) {
40
        return theme.label("Note: on vanilla servers you may give yourself up to 4 blocks of additional reach for specific actions - " +
41
            "interacting with block entities (chests, furnaces, etc.) or with vehicles. This does not work on paper servers.", Utils.getWindowWidth() / 3.0);
42
    }
43
44
    public double blockReach() {
45
        return isActive() ? blockReach.get() : 0;
46
    }
47
48
    public double entityReach() {
49
        return isActive() ? entityReach.get() : 0;
50
    }
51
}
52
MelaHack (ThunderHack fork)COMBATsrc/main/java/thunder/hack/features/modules/combat/Reach.javaJava · 22 lines · 896 B

Increases your reach distance.

SettingsBlocksRangeEntityRangeCreativeCBlocksRangeCEntityRange
Reach.javaJava · Minecraft 26.2 · 22 lines · 896 B · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.combat;
2
3
import thunder.hack.features.modules.Module;
4
import thunder.hack.setting.Setting;
5
6
public class Reach extends Module {
7
    public Reach() {
8
        super("Reach", Category.COMBAT);
9
    }
10
11
    public final Setting<Float> blocksRange = new Setting<>("BlocksRange", 3f, 0.1f, 10.0f);
12
    public final Setting<Float> entityRange = new Setting<>("EntityRange", 3f, 0.1f, 10.0f);
13
    public final Setting<Boolean> Creative = new Setting<>("Creative", false);
14
    public final Setting<Float> creativeBlocksRange = new Setting<>("CBlocksRange", 5f, 0.1f, 10.0f, v -> Creative.getValue());
15
    public final Setting<Float> creativeEntityRange = new Setting<>("CEntityRange", 5f, 0.1f, 10.0f, v -> Creative.getValue());
16
17
    @Override
18
    public String getDisplayInfo() {
19
        return "B: " + blocksRange.getValue() + " E:" + entityRange.getValue();
20
    }
21
}
22
OfflineClientPLAYERsrc/main/java/com/jellypudding/offlineclient/modules/player/Reach.javaJava · 40 lines · 1.4 KB

Reaches blocks and entities from further away.

SettingsBlock rangeEntity range
Reach.javaJava · Minecraft 26.2 · 40 lines · 1.4 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.player;
2
3
import com.jellypudding.offlineclient.module.Category;
4
import com.jellypudding.offlineclient.module.Module;
5
import com.jellypudding.offlineclient.setting.NumberSetting;
6
7
// The behaviour lives in LocalPlayerMixin which asks for each range.
8
public final class Reach extends Module {
9
10
    private final NumberSetting blockRange = new NumberSetting("Block range",
11
        "How far you can reach a block. Servers refuse anything past six.", 5, 3, 6, 0.05, " blocks")
12
        .max(10);
13
    private final NumberSetting entityRange = new NumberSetting("Entity range",
14
        "How far you can reach an entity. Servers refuse anything past six.", 5, 3, 6, 0.05, " blocks")
15
        .max(10);
16
17
    public Reach() {
18
        super("Reach", "Reaches blocks and entities from further away.", Category.PLAYER);
19
        addSettings(blockRange, entityRange);
20
    }
21
22
    @Override
23
    public String getSuffix() {
24
        return blockRange.getValueString() + " " + entityRange.getValueString();
25
    }
26
27
    public double adjustBlockRange(double vanilla) {
28
        return adjust(vanilla, blockRange);
29
    }
30
31
    public double adjustEntityRange(double vanilla) {
32
        return adjust(vanilla, entityRange);
33
    }
34
35
    // Never shrinks below what the game already allows.
36
    private double adjust(double vanilla, NumberSetting range) {
37
        return isEnabled() ? Math.max(vanilla, range.getValue()) : vanilla;
38
    }
39
}
40
CombatantCOMBATsrc/main/java/combatant/client/features/module/modules/combat/Reach.javaJava · 264 lines · 8.9 KB
SettingsreachContextreachModereachDistancereachWallDistance
Reach.javaJava · Minecraft 26.2 · 264 lines · 8.9 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Combatant Client distribution.
3
 * Copyright (c) 2026 pivosos2007.
4
 *
5
 * Licensed under the GNU General Public License v3.0.
6
 */
7
8
package combatant.client.features.module.modules.combat;
9
10
import net.minecraft.client.Minecraft;
11
import net.minecraft.client.player.LocalPlayer;
12
import net.minecraft.world.entity.Entity;
13
import net.minecraft.world.entity.LivingEntity;
14
import net.minecraft.world.entity.player.Player;
15
import net.minecraft.world.level.ClipContext;
16
import net.minecraft.world.phys.*;
17
import combatant.client.config.common.CommonSettingSchemas;
18
import combatant.client.config.values.EnumValue;
19
import combatant.client.config.values.NumberValue;
20
import combatant.client.features.module.Module;
21
import combatant.client.features.module.ModuleCategory;
22
import combatant.client.features.module.ModuleInfo;
23
import combatant.client.features.module.Modules;
24
import combatant.client.util.combat.VulcanReachController;
25
26
import java.util.List;
27
import java.util.Optional;
28
29
//todo Description
30
@ModuleInfo(
31
        id = "reach",
32
        displayName = "Reach",
33
        category = ModuleCategory.COMBAT
34
)
35
public class Reach extends Module {
36
37
    public final EnumValue<KillAura.RaycastMode> raycast =
38
            enumCommon(
39
                    "reachContext",
40
                    "raycast",
41
                    CommonSettingSchemas.COMBAT_RAYCAST,
42
                    KillAura.RaycastMode.STRICT,
43
                    KillAura.RaycastMode.values()
44
            );
45
    private final Minecraft mc = Minecraft.getInstance();
46
47
    private final EnumValue<Mode> mode =
48
            enumCommon(
49
                    "reachMode",
50
                    "mode",
51
                    CommonSettingSchemas.ANTICHEAT_MODE,
52
                    Mode.NORMAL,
53
                    Mode.values()
54
            );
55
56
    private final NumberValue<Double> distance =
57
            numCommon(
58
                    "reachDistance",
59
                    "range",
60
                    CommonSettingSchemas.COMBAT_RANGE,
61
                    4.5,
62
                    3.0,
63
                    6.0
64
            );
65
    private final NumberValue<Double> wallDistance =
66
            visibleWhen(numCommon(
67
                    "reachWallDistance",
68
                    "wall_range",
69
                    CommonSettingSchemas.COMBAT_WALL_RANGE,
70
                    3.0,
71
                    0.0,
72
                    6.0
73
            ), () -> raycast.get() == KillAura.RaycastMode.THROUGH_WALLS);
74
75
    private static double boxDistanceSq(AABB box, Vec3 p) {
76
        double dx = 0.0;
77
        if (p.x < box.minX) dx = box.minX - p.x;
78
        else if (p.x > box.maxX) dx = p.x - box.maxX;
79
80
        double dy = 0.0;
81
        if (p.y < box.minY) dy = box.minY - p.y;
82
        else if (p.y > box.maxY) dy = p.y - box.maxY;
83
84
        double dz = 0.0;
85
        if (p.z < box.minZ) dz = box.minZ - p.z;
86
        else if (p.z > box.maxZ) dz = p.z - box.maxZ;
87
88
        return dx * dx + dy * dy + dz * dz;
89
    }
90
91
    public EntityHitResult raycastEntities(LocalPlayer player) {
92
        if (!isEnabled()) return null;
93
        if (player == null || mc.level == null) return null;
94
95
        double visibleRange = distance.get();
96
        double throughWallsRange = raycast.get() == KillAura.RaycastMode.THROUGH_WALLS
97
                ? wallDistance.get()
98
                : 0.0;
99
        double searchRange = Math.max(visibleRange, throughWallsRange);
100
101
        Vec3 start = player.getEyePosition(1.0F);
102
        Vec3 direction = player.getViewVector(1.0F).normalize();
103
        Vec3 end = start.add(direction.scale(searchRange));
104
105
        double blockLimitSq = resolveBlockLimitSq(player, start, end, visibleRange, throughWallsRange);
106
107
        AABB search = new AABB(start, end).inflate(1.0);
108
109
        List<Entity> candidates = mc.level.getEntities(
110
                player,
111
                search,
112
                e -> e instanceof LivingEntity && e.isAlive()
113
        );
114
115
        return findBestHit(player, start, end, candidates, blockLimitSq, searchRange);
116
    }
117
118
    public EntityHitResult raycastEntities(LocalPlayer player, Vec3 start, Vec3 direction) {
119
        if (!isEnabled()) return null;
120
        if (player == null || mc.level == null) return null;
121
122
        double visibleRange = distance.get();
123
        double throughWallsRange = raycast.get() == KillAura.RaycastMode.THROUGH_WALLS
124
                ? wallDistance.get()
125
                : 0.0;
126
        double searchRange = Math.max(visibleRange, throughWallsRange);
127
128
        Vec3 dir = direction.normalize();
129
        Vec3 end = start.add(dir.scale(searchRange));
130
131
        double blockLimitSq = resolveBlockLimitSq(player, start, end, visibleRange, throughWallsRange);
132
133
        AABB search = new AABB(start, end).inflate(1.0);
134
135
        List<Entity> candidates = mc.level.getEntities(
136
                player,
137
                search,
138
                e -> e instanceof LivingEntity && e.isAlive()
139
        );
140
141
        return findBestHit(player, start, end, candidates, blockLimitSq, searchRange);
142
    }
143
144
    private EntityHitResult findBestHit(LocalPlayer player,
145
                                        Vec3 start,
146
                                        Vec3 end,
147
                                        List<Entity> candidates,
148
                                        double blockLimitSq,
149
                                        double requestedReach) {
150
        Hitbox hb = Modules.get(Hitbox.class);
151
152
        EntityHitResult bestHit = null;
153
        double bestBoxDistSq = Double.MAX_VALUE;
154
        double bestHitDistSq = Double.MAX_VALUE;
155
156
        for (Entity e : candidates) {
157
            if (hb != null && hb.isEnabled() && hb.shouldIgnore(e)) continue;
158
159
            AABB baseBox = e.getBoundingBox();
160
            AABB bb = baseBox;
161
            if (hb != null && hb.isEnabled() && hb.shouldExpandFor(e)) {
162
                bb = bb.inflate(hb.getPadding());
163
            }
164
165
            Optional<Vec3> hit = bb.contains(start)
166
                    ? Optional.of(start)
167
                    : bb.clip(start, end);
168
169
            if (hit.isEmpty()) continue;
170
171
            double boxDistSq = boxDistanceSq(baseBox, start);
172
            double entityReach = resolveEntityReach(e, requestedReach, hb);
173
            double entityReachSq = entityReach * entityReach;
174
            if (boxDistSq > entityReachSq) continue;
175
            if (boxDistSq > blockLimitSq) continue;
176
177
            double hitDistSq = start.distanceToSqr(hit.get());
178
179
            if (boxDistSq < bestBoxDistSq
180
                    || (boxDistSq == bestBoxDistSq && hitDistSq < bestHitDistSq)) {
181
                bestBoxDistSq = boxDistSq;
182
                bestHitDistSq = hitDistSq;
183
                bestHit = new EntityHitResult(e, hit.get());
184
            }
185
        }
186
187
        return bestHit;
188
    }
189
190
    private double resolveEntityReach(Entity entity, double requestedReach, Hitbox hitbox) {
191
        if (mode.get() == Mode.VULCAN_297 && entity instanceof Player) {
192
            return VulcanReachController.INSTANCE.clampReach(entity, requestedReach);
193
        }
194
        return requestedReach;
195
    }
196
197
    public boolean isVulcan297Mode() {
198
        return mode.get() == Mode.VULCAN_297;
199
    }
200
201
    public double getConfiguredDistance() {
202
        return distance.get();
203
    }
204
205
    private double resolveBlockLimitSq(LocalPlayer player,
206
                                       Vec3 start,
207
                                       Vec3 end,
208
                                       double visibleRange,
209
                                       double throughWallsRange) {
210
        KillAura.RaycastMode mode = raycast.get();
211
212
        if (mode == KillAura.RaycastMode.NONE) {
213
            double maxRange = Math.max(visibleRange, throughWallsRange);
214
            return maxRange * maxRange;
215
        }
216
217
        Hitbox hitbox = Modules.get(Hitbox.class);
218
        boolean forceThrough = hitbox != null && hitbox.isEnabled();
219
220
        if (mode == KillAura.RaycastMode.THROUGH_WALLS || forceThrough) {
221
            double maxAllowed = Math.max(visibleRange, throughWallsRange);
222
223
            HitResult blockHit = mc.level.clip(new ClipContext(
224
                    start,
225
                    end,
226
                    ClipContext.Block.OUTLINE,
227
                    ClipContext.Fluid.NONE,
228
                    player
229
            ));
230
231
            if (!(blockHit instanceof BlockHitResult bhr)) {
232
                return maxAllowed * maxAllowed;
233
            }
234
235
            double blockDistSq = bhr.getLocation().distanceToSqr(start);
236
237
            if (throughWallsRange <= 0.0) {
238
                return blockDistSq;
239
            }
240
241
            return Math.max(blockDistSq, throughWallsRange * throughWallsRange);
242
        }
243
244
        HitResult blockHit = mc.level.clip(new ClipContext(
245
                start,
246
                end,
247
                ClipContext.Block.OUTLINE,
248
                ClipContext.Fluid.NONE,
249
                player
250
        ));
251
252
        if (blockHit instanceof BlockHitResult bhr) {
253
            return bhr.getLocation().distanceToSqr(start);
254
        }
255
256
        return visibleRange * visibleRange;
257
    }
258
259
    public enum Mode {
260
        NORMAL,
261
        VULCAN_297
262
    }
263
}
264
LiquidBounce (Kotlin)PLAYERsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/player/ModuleReach.ktKotlin · 37 lines · 1.4 KB

Allows you to reach further.

SettingsBlockRangeIncrease
ModuleReach.ktKotlin · Minecraft 26.2 · 37 lines · 1.4 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3
 *
4
 * Copyright (c) 2015 - 2026 CCBlueX
5
 *
6
 * LiquidBounce is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * LiquidBounce is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18
 */
19
package net.ccbluex.liquidbounce.features.module.modules.player
20
21
import net.ccbluex.liquidbounce.features.module.ClientModule
22
import net.ccbluex.liquidbounce.features.module.ModuleCategories
23
import net.ccbluex.liquidbounce.utils.range.RangeValueGroup
24
25
/**
26
 * Reach module
27
 *
28
 * Increases your reach.
29
 *
30
 * @see net.ccbluex.liquidbounce.injection.mixins.minecraft.entity.MixinPlayer
31
 * @see net.ccbluex.liquidbounce.injection.mixins.minecraft.item.MixinAttackRange
32
 */
33
object ModuleReach : ClientModule("Reach", ModuleCategories.PLAYER) {
34
    val entity = tree(RangeValueGroup("Entity", 1f, 0f))
35
    val blockRangeIncrease by float("BlockRangeIncrease", 0.5f, 0f..64f)
36
}
37