ItemScroller module

ItemScroller: Minecraft 26.3 cheat module, full source for every implementation (2 clients: MelaHack (ThunderHack fork), LiquidBounce (Kotlin)).

2 implementationsMISC

Full module source: 2 implementations

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/ItemScroller.javaJava · 37 lines · 1.5 KB

Fast item swap in the chest.

SettingsDelay
ItemScroller.javaJava · Minecraft 26.2 · 37 lines · 1.5 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.misc;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.world.inventory.ContainerInput;
5
import net.minecraft.world.item.Item;
6
import org.lwjgl.glfw.GLFW;
7
import thunder.hack.events.impl.EventClickSlot;
8
import thunder.hack.injection.MixinClientPlayerInteractionManager;
9
import thunder.hack.features.modules.Module;
10
import thunder.hack.setting.Setting;
11
12
public class ItemScroller extends Module {
13
    public ItemScroller() {
14
        super("ItemScroller", Category.MISC);
15
    }
16
17
    public Setting<Integer> delay = new Setting<>("Delay",80,0,500);
18
19
    private boolean pauseListening = false;
20
21
    @EventHandler
22
    public void onClick(EventClickSlot e) {
23
        if ((isKeyPressed(GLFW.GLFW_KEY_LEFT_SHIFT) || isKeyPressed(GLFW.GLFW_KEY_RIGHT_SHIFT))
24
                && (isKeyPressed(GLFW.GLFW_KEY_LEFT_CONTROL) || isKeyPressed(GLFW.GLFW_KEY_RIGHT_CONTROL))
25
                && e.getSlotActionType() == ContainerInput.THROW
26
                && !pauseListening) {
27
            Item copy = mc.player.containerMenu.slots.get(e.getSlot()).getItem().getItem();
28
            pauseListening = true;
29
            for (int i2 = 0; i2 < mc.player.containerMenu.slots.size(); ++i2) {
30
                if (mc.player.containerMenu.slots.get(i2).getItem().getItem() == copy)
31
                    mc.gameMode.handleContainerInput(mc.player.containerMenu.containerId, i2, 1, ContainerInput.THROW, mc.player);
32
            }
33
            pauseListening = false;
34
        }
35
    }
36
}
37
LiquidBounce (Kotlin)MISCsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/misc/ModuleItemScroller.ktKotlin · 76 lines · 2.7 KB

Quickly moves items in the inventory with the SHIFT and LMB pressed

SettingsClickModeDelay
ModuleItemScroller.ktKotlin · Minecraft 26.2 · 76 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
20
package net.ccbluex.liquidbounce.features.module.modules.misc
21
22
import com.mojang.blaze3d.platform.InputConstants
23
import com.mojang.blaze3d.platform.Window
24
import net.ccbluex.liquidbounce.config.types.list.Tagged
25
import net.ccbluex.liquidbounce.features.module.ClientModule
26
import net.ccbluex.liquidbounce.features.module.ModuleCategories
27
import net.ccbluex.liquidbounce.utils.client.Chronometer
28
import net.minecraft.world.inventory.AbstractContainerMenu
29
import net.minecraft.world.inventory.ContainerInput
30
import net.minecraft.world.inventory.Slot
31
import org.lwjgl.glfw.GLFW
32
33
fun interface MouseClick {
34
    operator fun invoke(callbackSlot: Slot?, slotId: Int, mouseButton: Int, actionType: ContainerInput)
35
}
36
37
fun interface ClickAction {
38
    operator fun invoke(handler: AbstractContainerMenu, slot: Slot, callback: MouseClick)
39
}
40
41
/**
42
 * Quick item movement
43
 *
44
 * @author sqlerrorthing
45
 */
46
object ModuleItemScroller : ClientModule("ItemScroller", ModuleCategories.MISC) {
47
    @JvmStatic
48
    val clickMode by enumChoice("ClickMode", ClickMode.QUICK_MOVE)
49
50
    private val delay by intRange("Delay", 2..3, 0..20, suffix = "ticks")
51
52
    private val chronometer = Chronometer()
53
54
    fun resetChronometer() {
55
        chronometer.reset()
56
    }
57
58
    fun canPerformScroll(window: Window): Boolean {
59
        return (InputConstants.isKeyDown(window, InputConstants.KEY_LSHIFT)
60
                        || InputConstants.isKeyDown(window, InputConstants.KEY_RSHIFT))
61
                && this.running
62
                && GLFW.glfwGetMouseButton(window.handle(), InputConstants.MOUSE_BUTTON_LEFT) == InputConstants.PRESS
63
                && chronometer.hasAtLeastElapsed(delay.random() * 50L)
64
    }
65
}
66
67
@Suppress("UNUSED")
68
enum class ClickMode(
69
    override val tag: String,
70
    val action: ClickAction
71
) : Tagged {
72
    QUICK_MOVE("QuickMove", { _, slot, callback ->
73
        callback(slot, slot.index, InputConstants.MOUSE_BUTTON_LEFT, ContainerInput.QUICK_MOVE)
74
    })
75
}
76