AutoRespawn module

AutoRespawn: Minecraft 26.3 cheat module, full source for every implementation (4 clients: MelaHack (ThunderHack fork), OfflineClient, Nicotine, …).

4 implementationsPLAYERPlayer

Full module source: 4 implementations

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/AutoRespawn.javaJava · 61 lines · 2.5 KB

Automatically clicks respawn button.

SettingsdeathcoordsAuto Kitkit nameAuto HomeAuto Waypoint
AutoRespawn.javaJava · Minecraft 26.2 · 61 lines · 2.5 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import net.minecraft.ChatFormatting;
4
import net.minecraft.client.gui.screens.DeathScreen;
5
import thunder.hack.core.Managers;
6
import thunder.hack.core.manager.world.WayPointManager;
7
import thunder.hack.features.modules.Module;
8
import thunder.hack.setting.Setting;
9
import thunder.hack.utility.Timer;
10
11
public class AutoRespawn extends Module {
12
    public AutoRespawn() {
13
        super("AutoRespawn", Category.PLAYER);
14
    }
15
16
    private final Setting<Boolean> deathcoords = new Setting<>("deathcoords", true);
17
    private final Setting<Boolean> autokit = new Setting<>("Auto Kit", false);
18
    private final Setting<String> kit = new Setting<>("kit name", "kitname", v -> autokit.getValue());
19
    private final Setting<Boolean> autohome = new Setting<>("Auto Home", false);
20
    private final Setting<Boolean> autowaypoint = new Setting<>("Auto Waypoint", false);
21
22
    private boolean flag;
23
    private int waypointCount = 0;
24
    private final Timer timer = new Timer();
25
26
    @Override
27
    public void onUpdate() {
28
        if (fullNullCheck()) return;
29
30
        if (timer.passedMs(2100)) {
31
            timer.reset();
32
        }
33
34
        if (mc.gui.screen() instanceof DeathScreen) {
35
            if (flag){
36
                waypointCount += 1;
37
                if(deathcoords.getValue())
38
                    sendMessage(ChatFormatting.GOLD + "[PlayerDeath] " + ChatFormatting.YELLOW + (int) mc.player.getX() + " " + (int) mc.player.getY() + " " + (int) mc.player.getZ());
39
                if(autowaypoint.getValue()) {
40
                    WayPointManager.WayPoint wp = new WayPointManager.WayPoint((int) mc.player.getX(), (int) mc.player.getY(), (int) mc.player.getZ(), "Death №" + waypointCount, (mc.isLocalServer() ? "SinglePlayer" : mc.getConnection().getServerData().ip), mc.level.dimension().identifier().getPath());
41
                    Managers.WAYPOINT.addWayPoint(wp);
42
                }
43
                mc.player.respawn();
44
                mc.gui.setScreen(null);
45
46
                Managers.ASYNC.run(()-> {
47
                    if (autokit.getValue() && mc.player != null) {
48
                        mc.player.connection.sendCommand("kit " + kit.getValue());
49
                    }
50
                    if (autohome.getValue() && mc.player != null) {
51
                        mc.player.connection.sendCommand("home");
52
                    }
53
                },1000);
54
                flag = false;
55
            }
56
        } else {
57
            flag = true;
58
        }
59
    }
60
}
61
OfflineClientPLAYERsrc/main/java/com/jellypudding/offlineclient/modules/player/AutoRespawn.javaJava · 43 lines · 1.5 KB

Instantly respawns you after dying.

SettingsDeath screen button
AutoRespawn.javaJava · Minecraft 26.2 · 43 lines · 1.5 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.player;
2
3
import com.jellypudding.offlineclient.event.Subscribe;
4
import com.jellypudding.offlineclient.event.events.TickEvent;
5
import com.jellypudding.offlineclient.module.Category;
6
import com.jellypudding.offlineclient.module.Module;
7
import com.jellypudding.offlineclient.setting.BoolSetting;
8
import com.jellypudding.offlineclient.modules.render.Waypoints;
9
import com.jellypudding.offlineclient.util.Modules;
10
import net.minecraft.client.gui.screens.DeathScreen;
11
12
public final class AutoRespawn extends Module {
13
14
    private final BoolSetting deathButton = new BoolSetting("Death screen button",
15
        "Adds a button to the death screen that turns this on when you die with it off.", true);
16
17
    public AutoRespawn() {
18
        super("AutoRespawn", "Instantly respawns you after dying.", Category.PLAYER);
19
        addSettings(deathButton);
20
    }
21
22
    // Read by DeathScreenMixin whilst the module is off.
23
    public boolean showsButton() {
24
        return deathButton.isOn();
25
    }
26
27
    @Subscribe
28
    private void onTick(TickEvent event) {
29
        if (!inGame()) {
30
            return;
31
        }
32
        if (mc.gui.screen() instanceof DeathScreen) {
33
            Waypoints waypoints = Modules.get(Waypoints.class);
34
            if (waypoints != null) {
35
                waypoints.markDeath(mc.player.position());
36
            }
37
            // Closing the screen stops repeat respawn packets.
38
            mc.player.respawn();
39
            mc.gui.setScreen(null);
40
        }
41
    }
42
}
43
NicotinePlayersrc/client/java/nicotine/mod/mods/player/AutoRespawn.javaJava · 33 lines · 901 B
AutoRespawn.javaJava · Minecraft 26.3 · 33 lines · 901 B · complete file, verbatimOriginal ↗
1
package nicotine.mod.mods.player;
2
3
import net.minecraft.network.protocol.game.ServerboundClientCommandPacket;
4
import nicotine.events.ClientLevelTickEvent;
5
import nicotine.mod.Mod;
6
import nicotine.mod.ModCategory;
7
import nicotine.util.EventBus;
8
9
import static nicotine.util.Common.loadedChunks;
10
import static nicotine.util.Common.mc;
11
12
public class AutoRespawn extends Mod {
13
14
    public AutoRespawn() {
15
        super(ModCategory.Player, "AutoRespawn");
16
    }
17
18
    @Override
19
    protected void init() {
20
        EventBus.register(ClientLevelTickEvent.class, event -> {
21
            if (!this.enabled)
22
                return true;
23
24
            if (mc.player.isDeadOrDying()) {
25
                loadedChunks.clear();
26
                mc.getConnection().send(new ServerboundClientCommandPacket(ServerboundClientCommandPacket.Action.PERFORM_RESPAWN));
27
            }
28
29
            return true;
30
        });
31
    }
32
}
33
LiquidBounce (Kotlin)PLAYERsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/player/ModuleAutoRespawn.ktKotlin · 50 lines · 1.7 KB

Automatically respawns you after dying.

SettingsDelay
ModuleAutoRespawn.ktKotlin · Minecraft 26.2 · 50 lines · 1.7 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3
 *
4
 * Copyright (c) 2015 - 2026 CCBlueX
5
 *
6
 * LiquidBounce is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * LiquidBounce is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18
 */
19
package net.ccbluex.liquidbounce.features.module.modules.player
20
21
import net.ccbluex.liquidbounce.event.events.ScreenEvent
22
import net.ccbluex.liquidbounce.event.sequenceHandler
23
import net.ccbluex.liquidbounce.event.waitTicks
24
import net.ccbluex.liquidbounce.features.module.ClientModule
25
import net.ccbluex.liquidbounce.features.module.ModuleCategories
26
import net.minecraft.client.gui.screens.DeathScreen
27
28
/**
29
 * AutoRespawn module
30
 *
31
 * Automatically respawns the player after dying.
32
 */
33
object ModuleAutoRespawn : ClientModule("AutoRespawn", ModuleCategories.PLAYER) {
34
35
    // There is a delay until the button is clickable on the death screen (20 ticks)
36
    private val delay by int("Delay", 0, 0..20, "ticks")
37
38
    val screenHandler = sequenceHandler<ScreenEvent> {
39
        if (it.screen is DeathScreen) {
40
            if (delay > 0) {
41
                waitTicks(delay)
42
            }
43
44
            player.respawn()
45
            mc.gui.setScreen(null)
46
        }
47
    }
48
49
}
50