FastPlace module

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

2 implementationsPLAYERWORLD

Full module source: 2 implementations

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

OfflineClientPLAYERsrc/main/java/com/jellypudding/offlineclient/modules/player/FastPlace.javaJava · 36 lines · 1.2 KB

Removes the delay between placing blocks.

SettingsDelay
FastPlace.javaJava · Minecraft 26.2 · 36 lines · 1.2 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.NumberSetting;
8
import net.minecraft.world.item.BlockItem;
9
import net.minecraft.world.item.ItemStack;
10
11
// Other items are handled by FastUse. Both share the delay cap in FastUse.capUseDelay.
12
public final class FastPlace extends Module {
13
14
    private final NumberSetting delay = new NumberSetting("Delay",
15
        "Ticks between placing blocks. Vanilla waits 4.", 0, 0, 4, 1, " ticks");
16
17
    public FastPlace() {
18
        super("FastPlace", "Removes the delay between placing blocks.", Category.PLAYER);
19
        addSettings(delay);
20
    }
21
22
    @Subscribe
23
    private void onTick(TickEvent event) {
24
        if (!inGame()) {
25
            return;
26
        }
27
        ItemStack held = mc.player.getMainHandItem();
28
        if (held.isEmpty()) {
29
            held = mc.player.getOffhandItem();
30
        }
31
        if (held.getItem() instanceof BlockItem) {
32
            FastUse.capUseDelay(delay.getInt());
33
        }
34
    }
35
}
36
LiquidBounce (Kotlin)WORLDsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/world/ModuleFastPlace.ktKotlin · 69 lines · 2.7 KB

Allows you to place blocks faster.

SettingsCooldownApplyToStartDelay
ModuleFastPlace.ktKotlin · Minecraft 26.2 · 69 lines · 2.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.world
20
21
import net.ccbluex.liquidbounce.config.types.list.Tagged
22
import net.ccbluex.liquidbounce.event.events.UseCooldownEvent
23
import net.ccbluex.liquidbounce.event.handler
24
import net.ccbluex.liquidbounce.features.module.ClientModule
25
import net.ccbluex.liquidbounce.features.module.ModuleCategories
26
import net.ccbluex.liquidbounce.utils.input.InputTracker.timeSinceLastPress
27
import net.minecraft.world.item.BlockItem
28
import net.minecraft.world.item.Item
29
import net.minecraft.world.item.ProjectileItem
30
import java.util.function.Predicate
31
32
/**
33
 * FastPlace module
34
 *
35
 * Allows you to place blocks faster.
36
 */
37
object ModuleFastPlace : ClientModule("FastPlace", ModuleCategories.WORLD) {
38
39
    private val cooldown by intRange("Cooldown", 0..0, 0..4, "ticks")
40
    private val applyTo by multiEnumChoice("ApplyTo", ApplyTo.entries)
41
    private val startDelay by int("StartDelay", 0, 0..1000, "ms")
42
43
    @Suppress("unused")
44
    private val useCooldownHandler = handler<UseCooldownEvent> { event ->
45
        val mainHandItem = player.mainHandItem.item
46
        val offHandItem = player.offhandItem.item
47
48
        if (applyTo.any {
49
                it.condition.test(mainHandItem) || it.condition.test(offHandItem)
50
            } && (startDelay <= 0 || mc.options.keyUse.timeSinceLastPress >= startDelay)) {
51
            val newCooldown = cooldown.random()
52
            // Only override cooldown when there's an actual change to apply;
53
            // avoids resetting an already-zero cooldown needlessly
54
            if (newCooldown > 0 || event.cooldown > 0) {
55
                event.cooldown = newCooldown
56
            }
57
        }
58
    }
59
60
    @Suppress("unused")
61
    private enum class ApplyTo(
62
        override val tag: String,
63
        val condition: Predicate<Item>
64
    ): Tagged {
65
        PROJECTILES("Projectiles", { item -> item is ProjectileItem }),
66
        BLOCKS("Blocks", { item -> item is BlockItem })
67
    }
68
}
69