PortalGodMode module

PortalGodMode: 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/PortalGodMode.javaJava · 46 lines · 1.5 KB

Makes you invulnerable after teleportation.

PortalGodMode.javaJava · Minecraft 26.2 · 46 lines · 1.5 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket;
6
import net.minecraft.world.level.block.Blocks;
7
import thunder.hack.events.impl.PacketEvent;
8
import thunder.hack.features.modules.Module;
9
import thunder.hack.utility.Timer;
10
11
public class PortalGodMode extends Module {
12
    private Timer confirmTimer = new Timer();
13
    private boolean teleported;
14
15
    public PortalGodMode() {
16
        super("PortalGodMode", Category.PLAYER);
17
        confirmTimer.setMs(99999);
18
    }
19
20
    @EventHandler
21
    public void onPacketSend(PacketEvent.Send e) {
22
        if (e.getPacket() instanceof ServerboundAcceptTeleportationPacket && confirmTimer.getPassedTimeMs() < 5000) {
23
            teleported = true;
24
            e.cancel();
25
        }
26
    }
27
28
    @Override
29
    public void onDisable(){
30
        teleported = false;
31
    }
32
33
    @Override
34
    public void onUpdate() {
35
        for(int x = (int) (mc.player.getX() - 2); x < mc.player.getX() + 2; x++)
36
            for(int z = (int) (mc.player.getZ() - 2); z < mc.player.getZ() + 2; z++)
37
                for(int y = (int) (mc.player.getY() - 2); y < mc.player.getY() + 2; y++)
38
                    if(mc.level.getBlockState(BlockPos.containing(x,y,z)).getBlock() == Blocks.NETHER_PORTAL)
39
                        confirmTimer.reset();
40
    }
41
42
    @Override
43
    public String getDisplayInfo() {
44
        return teleported ? "God" : confirmTimer.getPassedTimeMs() < 5000 ? "Ready" : "Waiting";
45
    }
46
}