anti-anchor module

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

1 implementationCombat

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 ClientCombatsrc/main/java/meteordevelopment/meteorclient/systems/modules/combat/AntiAnchor.javaJava · 59 lines · 2.2 KB

Automatically prevents Anchor Aura by placing a slab on your head.

Settingsrotateswing
AntiAnchor.javaJava · Minecraft 26.2 · 59 lines · 2.2 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.combat;
7
8
import meteordevelopment.meteorclient.events.world.TickEvent;
9
import meteordevelopment.meteorclient.settings.BoolSetting;
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.utils.player.InvUtils;
15
import meteordevelopment.meteorclient.utils.world.BlockUtils;
16
import meteordevelopment.orbit.EventHandler;
17
import net.minecraft.world.level.block.Block;
18
import net.minecraft.world.level.block.Blocks;
19
import net.minecraft.world.level.block.SlabBlock;
20
21
public class AntiAnchor extends Module {
22
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
23
24
    private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
25
        .name("rotate")
26
        .description("Makes you rotate when placing.")
27
        .defaultValue(true)
28
        .build()
29
    );
30
31
    private final Setting<Boolean> swing = sgGeneral.add(new BoolSetting.Builder()
32
        .name("swing")
33
        .description("Swings your hand when placing.")
34
        .defaultValue(true)
35
        .build()
36
    );
37
38
    public AntiAnchor() {
39
        super(Categories.Combat, "anti-anchor", "Automatically prevents Anchor Aura by placing a slab on your head.");
40
    }
41
42
    @EventHandler
43
    private void onTick(TickEvent.Pre event) {
44
        if (mc.level.getBlockState(mc.player.blockPosition().above(2)).getBlock() == Blocks.RESPAWN_ANCHOR
45
            && mc.level.getBlockState(mc.player.blockPosition().above()).getBlock() == Blocks.AIR) {
46
47
            BlockUtils.place(
48
                mc.player.blockPosition().offset(0, 1, 0),
49
                InvUtils.findInHotbar(itemStack -> Block.byItem(itemStack.getItem()) instanceof SlabBlock),
50
                rotate.get(),
51
                15,
52
                swing.get(),
53
                false,
54
                true
55
            );
56
        }
57
    }
58
}
59