Throw module

Throw: Minecraft 26.3 cheat module, full source for every implementation (1 client: OfflineClient).

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.

OfflineClientPLAYERsrc/main/java/com/jellypudding/offlineclient/modules/player/Throw.javaJava · 44 lines · 1.6 KB

Fires a whole stack of throwables in one click.

SettingsAmount
Throw.javaJava · Minecraft 26.2 · 44 lines · 1.6 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.RightClickEvent;
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.InteractionHand;
9
import net.minecraft.world.phys.BlockHitResult;
10
import net.minecraft.world.phys.HitResult;
11
12
// Every right click is repeated many times in the same tick. A stack of pearls
13
// or snowballs or eggs goes out in one go.
14
public final class Throw extends Module {
15
16
    private final NumberSetting amount = new NumberSetting("Amount",
17
        "How many uses one click fires.", 16, 2, 256, 1).min(2).max(100000);
18
19
    public Throw() {
20
        super("Throw", "Fires a whole stack of throwables in one click.", Category.PLAYER);
21
        addSettings(amount);
22
        searchTags("spam throw", "pearl spam", "snowball", "egg");
23
    }
24
25
    @Override
26
    public String getSuffix() {
27
        return amount.getValueString();
28
    }
29
30
    @Subscribe
31
    private void onRightClick(RightClickEvent event) {
32
        if (!inGame() || mc.rightClickDelay > 0 || !mc.options.keyUse.isDown()) {
33
            return;
34
        }
35
        for (int i = 0; i < amount.getInt(); i++) {
36
            if (mc.hitResult instanceof BlockHitResult block
37
                && block.getType() == HitResult.Type.BLOCK) {
38
                mc.gameMode.useItemOn(mc.player, InteractionHand.MAIN_HAND, block);
39
            }
40
            mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
41
        }
42
    }
43
}
44