NoClip module

NoClip: Minecraft 26.3 cheat module, full source for every implementation (2 clients: OfflineClient, LiquidBounce (Kotlin)).

2 implementationsMOVEMENT

Full module source: 2 implementations

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

OfflineClientMOVEMENTsrc/main/java/com/jellypudding/offlineclient/modules/movement/NoClip.javaJava · 90 lines · 2.8 KB

Turns your collision off. Vanilla servers and single player pull you straight back. Only works where the server skips that check.

SettingsSpeed
NoClip.javaJava · Minecraft 26.2 · 90 lines · 2.8 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.movement;
2
3
import com.jellypudding.offlineclient.event.Subscribe;
4
import com.jellypudding.offlineclient.event.events.PacketReceiveEvent;
5
import com.jellypudding.offlineclient.event.events.TickEvent;
6
import com.jellypudding.offlineclient.module.Category;
7
import com.jellypudding.offlineclient.module.Module;
8
import com.jellypudding.offlineclient.setting.NumberSetting;
9
import com.jellypudding.offlineclient.util.MovementUtil;
10
import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
11
import net.minecraft.world.phys.Vec3;
12
13
// PlayerMixin keeps physics off whilst active. Vanilla and singleplayer pull you back.
14
// Only works on a server that skips that check.
15
public final class NoClip extends Module {
16
17
    // Ticks the collision stays on after the server pulls the player back.
18
    private static final int SETTLE_TICKS = 10;
19
20
    private final NumberSetting speed = new NumberSetting("Speed",
21
        "Blocks a tick you move through the world.", 0.5, 0.1, 5, 0.1, " blocks");
22
23
    // Set from the packet thread when the server sends the player back.
24
    private volatile boolean pulledBack;
25
    private int settle;
26
27
    public NoClip() {
28
        super("NoClip", "Turns your collision off. Vanilla servers and single player pull you straight back. Only works where the server skips that check.",
29
            Category.MOVEMENT);
30
        addSettings(speed);
31
        searchTags("phase", "through walls");
32
    }
33
34
    @Override
35
    public String getSuffix() {
36
        return settle > 0 ? "pulled back" : null;
37
    }
38
39
    // Read by PlayerMixin. The physics flag stays off only whilst this is true.
40
    public boolean passesThroughBlocks() {
41
        return isEnabled() && settle == 0;
42
    }
43
44
    @Override
45
    protected void onEnable() {
46
        pulledBack = false;
47
        settle = 0;
48
    }
49
50
    @Override
51
    protected void onDisable() {
52
        if (mc.player != null && !mc.player.isSpectator()) {
53
            mc.player.noPhysics = false;
54
        }
55
    }
56
57
    @Subscribe
58
    private void onPacketReceive(PacketReceiveEvent event) {
59
        if (event.getPacket() instanceof ClientboundPlayerPositionPacket) {
60
            pulledBack = true;
61
        }
62
    }
63
64
    @Subscribe
65
    private void onTick(TickEvent event) {
66
        if (!inGame()) {
67
            return;
68
        }
69
        if (pulledBack) {
70
            pulledBack = false;
71
            settle = SETTLE_TICKS;
72
            mc.player.noPhysics = false;
73
        }
74
        if (settle > 0) {
75
            settle--;
76
            return;
77
        }
78
        double pace = speed.getValue();
79
        double vy = 0;
80
        if (mc.options.keyJump.isDown()) {
81
            vy += pace;
82
        }
83
        if (mc.options.keyShift.isDown()) {
84
            vy -= pace;
85
        }
86
        Vec3 heading = MovementUtil.inputDirection();
87
        mc.player.setDeltaMovement(heading.x * pace, vy, heading.z * pace);
88
    }
89
}
90
LiquidBounce (Kotlin)MOVEMENTsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/movement/ModuleNoClip.ktKotlin · 99 lines · 3.3 KB

Allows you to move through blocks (let a sand block drop on your head first).

SettingsSpeedOnlyInVehicleDisableOnSetback
ModuleNoClip.ktKotlin · Minecraft 26.2 · 99 lines · 3.3 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.movement
20
21
import net.ccbluex.liquidbounce.event.events.PacketEvent
22
import net.ccbluex.liquidbounce.event.handler
23
import net.ccbluex.liquidbounce.event.tickHandler
24
import net.ccbluex.liquidbounce.features.module.ClientModule
25
import net.ccbluex.liquidbounce.features.module.ModuleCategories
26
import net.ccbluex.liquidbounce.utils.client.chat
27
import net.ccbluex.liquidbounce.utils.client.markAsError
28
import net.ccbluex.liquidbounce.utils.entity.withStrafe
29
import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket
30
31
/**
32
 * NoClip module
33
 *
34
 * Allows you to fly through blocks.
35
 */
36
object ModuleNoClip : ClientModule("NoClip", ModuleCategories.MOVEMENT) {
37
38
    val speed by float("Speed", 0.32f, 0.1f..0.4f)
39
    private val onlyInVehicle by boolean("OnlyInVehicle", false)
40
    private val disableOnSetback by boolean("DisableOnSetback", true)
41
42
    private var noClipSet = false
43
44
    @Suppress("unused")
45
    private val handleGameTick = tickHandler {
46
        if (paused()) {
47
            if (noClipSet) {
48
                onDisabled()
49
            }
50
51
            return@tickHandler
52
        }
53
54
        noClipSet = true
55
        player.noPhysics = true
56
        player.fallDistance = 0.0
57
        player.setOnGround(false)
58
59
        val speed = speed.toDouble()
60
        player.controlledVehicle?.let {
61
            it.noPhysics = true
62
63
            if (!ModuleVehicleControl.running) {
64
                it.deltaMovement = it.deltaMovement.withStrafe(speed = speed)
65
                it.deltaMovement.y = when {
66
                    mc.options.keyJump.isDown -> speed
67
                    mc.options.keyShift.isDown -> -speed
68
                    else -> 0.0
69
                }
70
            }
71
        } ?: run {
72
            player.deltaMovement = player.deltaMovement.withStrafe(speed = speed)
73
74
            player.deltaMovement.y = when {
75
                mc.options.keyJump.isDown -> speed
76
                mc.options.keyShift.isDown -> -speed
77
                else -> 0.0
78
            }
79
        }
80
    }
81
82
    val packetHandler = handler<PacketEvent> { event ->
83
        // Setback detection
84
        if (event.packet is ClientboundPlayerPositionPacket && disableOnSetback && !paused()) {
85
            chat(markAsError(this.message("setbackDetected")))
86
            enabled = false
87
        }
88
    }
89
90
    override fun onDisabled() {
91
        noClipSet = false
92
        player.noPhysics = false
93
        player.controlledVehicle?.let { it.noPhysics = false }
94
    }
95
96
    fun paused() = onlyInVehicle && mc.player?.controlledVehicle == null
97
98
}
99