NoMiningTrace module

NoMiningTrace: Minecraft 26.3 cheat module, full source for every implementation (1 client: OfflineClient).

1 implementationPLAYER

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.

OfflineClientPLAYERsrc/main/java/com/jellypudding/offlineclient/modules/player/NoMiningTrace.javaJava · 53 lines · 2.0 KB

Mines blocks through entities standing in the way.

SettingsExemptTool onlyKeep players
NoMiningTrace.javaJava · Minecraft 26.2 · 53 lines · 2.0 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.BoolSetting;
6
import com.jellypudding.offlineclient.setting.RegistryListSetting;
7
import net.minecraft.core.registries.BuiltInRegistries;
8
import net.minecraft.tags.ItemTags;
9
import net.minecraft.world.entity.Entity;
10
import net.minecraft.world.entity.EntityType;
11
import net.minecraft.world.entity.player.Player;
12
import net.minecraft.world.item.ItemStack;
13
14
import java.util.List;
15
16
// Lets the crosshair pass through entities.
17
public final class NoMiningTrace extends Module {
18
19
    private final RegistryListSetting<EntityType<?>> exempt = new RegistryListSetting<>("Exempt",
20
        "Entities the crosshair still stops on. Click to pick them.",
21
        BuiltInRegistries.ENTITY_TYPE, List.of());
22
    private final BoolSetting toolOnly = new BoolSetting("Tool only",
23
        "Only work whilst a pickaxe or an axe is in a hand.", true);
24
    private final BoolSetting skipPlayers = new BoolSetting("Keep players",
25
        "Never look through other players.", true);
26
27
    public NoMiningTrace() {
28
        super("NoMiningTrace", "Mines blocks through entities standing in the way.", Category.PLAYER);
29
        addSettings(exempt, toolOnly, skipPlayers);
30
        searchTags("mine through", "entity", "crosshair");
31
    }
32
33
    public boolean ignores(Entity entity) {
34
        if (!isEnabled() || entity == null || !inGame()) {
35
            return false;
36
        }
37
        if (skipPlayers.isOn() && entity instanceof Player) {
38
            return false;
39
        }
40
        if (exempt.contains(entity.getType())) {
41
            return false;
42
        }
43
        if (!toolOnly.isOn()) {
44
            return true;
45
        }
46
        return isTool(mc.player.getMainHandItem()) || isTool(mc.player.getOffhandItem());
47
    }
48
49
    private static boolean isTool(ItemStack stack) {
50
        return stack.is(ItemTags.PICKAXES) || stack.is(ItemTags.AXES);
51
    }
52
}
53