PearlBait module

PearlBait: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

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.

MelaHack (ThunderHack fork)PLAYERsrc/main/java/thunder/hack/features/modules/player/PearlBait.javaJava · 31 lines · 1.3 KB

Prevents the tp from the pearl.

PearlBait.javaJava · Minecraft 26.2 · 31 lines · 1.3 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
5
import net.minecraft.world.entity.projectile.throwableitemprojectile.ThrownEnderpearl;
6
import thunder.hack.events.impl.EventEntitySpawn;
7
import thunder.hack.features.modules.Module;
8
import thunder.hack.utility.player.MovementUtility;
9
10
import java.util.Comparator;
11
12
public class PearlBait extends Module {
13
    public PearlBait() {
14
        super("PearlBait", Category.PLAYER);
15
    }
16
17
    @EventHandler
18
    public void onEntitySpawn(EventEntitySpawn e) {
19
        if (e.getEntity() instanceof ThrownEnderpearl)
20
            mc.level.players().stream()
21
                    .min(Comparator.comparingDouble((p) -> p.distanceToSqr(e.getEntity().position())))
22
                    .ifPresent((player) -> {
23
                        if (player.equals(mc.player) && mc.player.onGround()) {
24
                            mc.player.setDeltaMovement(0, 0, 0);
25
                            MovementUtility.clearMovementInput();
26
                            mc.player.connection.send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), mc.player.getY() + 1.0, mc.player.getZ(), false, mc.player.horizontalCollision));
27
                        }
28
                    });
29
    }
30
}
31