ghost-hand module

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

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.

Meteor ClientPlayersrc/main/java/meteordevelopment/meteorclient/systems/modules/player/GhostHand.javaJava · 61 lines · 2.5 KB

Opens containers through walls.

GhostHand.javaJava · Minecraft 26.2 · 61 lines · 2.5 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 it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
9
import meteordevelopment.meteorclient.events.entity.player.DoItemUseEvent;
10
import meteordevelopment.meteorclient.systems.modules.Categories;
11
import meteordevelopment.meteorclient.systems.modules.Module;
12
import meteordevelopment.orbit.EventHandler;
13
import net.minecraft.core.BlockPos;
14
import net.minecraft.core.Direction;
15
import net.minecraft.world.InteractionHand;
16
import net.minecraft.world.InteractionResult;
17
import net.minecraft.world.phys.BlockHitResult;
18
import net.minecraft.world.phys.Vec3;
19
20
import java.util.Set;
21
22
public class GhostHand extends Module {
23
    private final Set<BlockPos> posList = new ObjectOpenHashSet<>();
24
25
    public GhostHand() {
26
        super(Categories.Player, "ghost-hand", "Opens containers through walls.");
27
    }
28
29
    @EventHandler
30
    private void onTick(DoItemUseEvent event) {
31
        if (!mc.options.keyUse.isDown() || mc.player.isShiftKeyDown()) return;
32
33
        if (mc.level.getBlockState(BlockPos.containing(mc.player.pick(mc.player.blockInteractionRange(), mc.getDeltaTracker().getGameTimeDeltaPartialTick(true), false).getLocation())).hasBlockEntity())
34
            return;
35
36
        Vec3 direction = new Vec3(0, 0, 0.1)
37
            .xRot(-(float) Math.toRadians(mc.player.getXRot()))
38
            .yRot(-(float) Math.toRadians(mc.player.getYRot()));
39
40
        posList.clear();
41
42
        for (int i = 1; i < mc.player.blockInteractionRange() * 10; i++) {
43
            BlockPos pos = BlockPos.containing(mc.player.getEyePosition(mc.getDeltaTracker().getGameTimeDeltaPartialTick(true)).add(direction.scale(i)));
44
45
            if (posList.contains(pos)) continue;
46
            posList.add(pos);
47
48
            if (mc.level.getBlockState(pos).hasBlockEntity()) {
49
                for (InteractionHand hand : InteractionHand.values()) {
50
                    InteractionResult result = mc.gameMode.useItemOn(mc.player, hand, new BlockHitResult(new Vec3(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
51
                    if (result instanceof InteractionResult.Success || result instanceof InteractionResult.Fail) {
52
                        mc.player.swing(hand);
53
                        event.cancel();
54
                        return;
55
                    }
56
                }
57
            }
58
        }
59
    }
60
}
61