PacketCanceler module

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

1 implementationMISC

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)MISCsrc/main/java/thunder/hack/features/modules/misc/PacketCanceler.javaJava · 33 lines · 1.6 KB
SettingsClickSlotC2SPacketPositionAndOnGroundOnGroundOnlyLookAndOnGround
PacketCanceler.javaJava · Minecraft 26.2 · 33 lines · 1.6 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.misc;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.network.protocol.game.ServerboundContainerClickPacket;
5
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
6
import org.jetbrains.annotations.NotNull;
7
import thunder.hack.events.impl.PacketEvent;
8
import thunder.hack.features.modules.Module;
9
import thunder.hack.setting.Setting;
10
11
public final class PacketCanceler extends Module {
12
    private final Setting<Boolean> clickSlot = new Setting<>("ClickSlotC2SPacket", false);
13
    private final Setting<Boolean> playerMovePosAndOnGround = new Setting<>("PositionAndOnGround", false);
14
    private final Setting<Boolean> playerMoveOnGroundOnly = new Setting<>("OnGroundOnly", false);
15
    private final Setting<Boolean> playerMoveLookAndOnGround = new Setting<>("LookAndOnGround", false);
16
    public PacketCanceler() {
17
        super("PacketCanceler", Category.MISC);
18
    }
19
20
    @EventHandler
21
    @SuppressWarnings("unused")
22
    private void onPacketSend(PacketEvent.@NotNull Send e) {
23
        if (e.getPacket() instanceof ServerboundContainerClickPacket && clickSlot.getValue()) {
24
            e.cancel();
25
        } else if (e.getPacket() instanceof ServerboundMovePlayerPacket.Pos && playerMovePosAndOnGround.getValue()) {
26
            e.cancel();
27
        } else if (e.getPacket() instanceof ServerboundMovePlayerPacket.StatusOnly && playerMoveOnGroundOnly.getValue()) {
28
            e.cancel();
29
        } else if (e.getPacket() instanceof ServerboundMovePlayerPacket.Rot && playerMoveLookAndOnGround.getValue()) {
30
            e.cancel();
31
        }
32
    }
33
}