TridentBoost module

TridentBoost: Minecraft 26.3 cheat module, full source for every implementation (3 clients: MelaHack (ThunderHack fork), OfflineClient, LiquidBounce

3 implementationsMOVEMENT

Full module source: 3 implementations

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

MelaHack (ThunderHack fork)MOVEMENTsrc/main/java/thunder/hack/features/modules/movement/TridentBoost.javaJava · 64 lines · 2.8 KB
SettingsModeFactorCooldownAnyWeather
TridentBoost.javaJava · Minecraft 26.2 · 64 lines · 2.8 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.movement;
2
3
import meteordevelopment.orbit.EventHandler;
4
import net.minecraft.core.Holder;
5
import net.minecraft.sounds.SoundEvent;
6
import net.minecraft.sounds.SoundEvents;
7
import net.minecraft.sounds.SoundSource;
8
import net.minecraft.util.Mth;
9
import net.minecraft.world.entity.MoverType;
10
import net.minecraft.world.item.enchantment.EnchantmentEffectComponents;
11
import net.minecraft.world.item.enchantment.EnchantmentHelper;
12
import net.minecraft.world.phys.Vec3;
13
import thunder.hack.events.impl.UseTridentEvent;
14
import thunder.hack.features.modules.Module;
15
import thunder.hack.setting.Setting;
16
17
public class TridentBoost extends Module {
18
    public TridentBoost() {
19
        super("TridentBoost", Category.MOVEMENT);
20
    }
21
22
    private final Setting<Mode> mode = new Setting<>("Mode", Mode.Motion);
23
    private final Setting<Float> factor = new Setting<>("Factor", 1f, 0.1f, 20f);
24
    public final Setting<Integer> cooldown = new Setting<>("Cooldown", 10, 0, 20);
25
    public final Setting<Boolean> anyWeather = new Setting<>("AnyWeather", true);
26
27
    private enum Mode {
28
        Motion, Factor
29
    }
30
31
    @EventHandler
32
    public void onUseTrident(UseTridentEvent e) {
33
        if (mc.player.getTicksUsingItem() >= cooldown.getValue()) {
34
            float j = EnchantmentHelper.getTridentSpinAttackStrength(mc.player.getUseItem(), mc.player);
35
            if (anyWeather.getValue() || mc.player.isInWaterOrRain()) {
36
                if (j > 0) {
37
                    float f = mc.player.getYRot();
38
                    float g = mc.player.getXRot();
39
                    float speedX = -Mth.sin(f * 0.017453292F) * Mth.cos(g * 0.017453292F);
40
                    float speedY = -Mth.sin(g * 0.017453292F);
41
                    float speedZ = Mth.cos(f * 0.017453292F) * Mth.cos(g * 0.017453292F);
42
                    float plannedSpeed = Mth.sqrt(speedX * speedX + speedY * speedY + speedZ * speedZ);
43
44
                    float n = mode.is(Mode.Factor) ? factor.getValue() * 3.0F * ((1.0F + (float) j) / 4.0F) : factor.getValue();
45
46
                    speedX *= n / plannedSpeed;
47
                    speedY *= n / plannedSpeed;
48
                    speedZ *= n / plannedSpeed;
49
50
                    mc.player.push(speedX, speedY, speedZ);
51
                    mc.player.startAutoSpinAttack(20, 8f, mc.player.getUseItem());
52
53
                    if (mc.player.onGround())
54
                        mc.player.move(MoverType.SELF, new Vec3(0.0, 1.1999999284744263, 0.0));
55
56
                    Holder<SoundEvent> registryEntry = EnchantmentHelper.pickHighestLevel(mc.player.getUseItem(), EnchantmentEffectComponents.TRIDENT_SOUND).orElse(SoundEvents.TRIDENT_THROW);
57
                    mc.level.playSound(null, mc.player, registryEntry.value(), SoundSource.PLAYERS, 1.0F, 1.0F);
58
                }
59
            }
60
        }
61
        e.cancel();
62
    }
63
}
64
OfflineClientMOVEMENTsrc/main/java/com/jellypudding/offlineclient/modules/movement/TridentBoost.javaJava · 35 lines · 1.1 KB

Makes a riptide trident throw you further.

SettingsBoostOut of water
TridentBoost.javaJava · Minecraft 26.2 · 35 lines · 1.1 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.movement;
2
3
import com.jellypudding.offlineclient.module.Category;
4
import com.jellypudding.offlineclient.module.Module;
5
import com.jellypudding.offlineclient.setting.BoolSetting;
6
import com.jellypudding.offlineclient.setting.NumberSetting;
7
8
// Behaviour lives in TridentItemMixin.
9
public final class TridentBoost extends Module {
10
11
    private final NumberSetting boost = new NumberSetting("Boost",
12
        "How many times harder a riptide throws you.", 2, 1, 10, 0.5, "x").min(0.1);
13
    private final BoolSetting outOfWater = new BoolSetting("Out of water",
14
        "Riptide works on dry land and in clear weather.", true);
15
16
    public TridentBoost() {
17
        super("TridentBoost", "Makes a riptide trident throw you further.", Category.MOVEMENT);
18
        addSettings(boost, outOfWater);
19
        searchTags("riptide");
20
    }
21
22
    @Override
23
    public String getSuffix() {
24
        return boost.getValueString();
25
    }
26
27
    public double multiplier() {
28
        return isEnabled() ? boost.getValue() : 1;
29
    }
30
31
    public boolean allowsDryLand() {
32
        return isEnabled() && outOfWater.isOn();
33
    }
34
}
35
LiquidBounce (Kotlin)MOVEMENTsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/movement/ModuleTridentBoost.ktKotlin · 46 lines · 1.7 KB

Strengthens the riptide dash of a trident and allows it to be used on dry land.

SettingsHorizontalMultiplierVerticalMultiplierOnLand
ModuleTridentBoost.ktKotlin · Minecraft 26.2 · 46 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
20
package net.ccbluex.liquidbounce.features.module.modules.movement
21
22
import net.ccbluex.liquidbounce.features.module.ClientModule
23
import net.ccbluex.liquidbounce.features.module.ModuleCategories
24
25
/**
26
 * TridentBoost module
27
 *
28
 * Strengthens the riptide dash of a trident and allows it to be used on dry land.
29
 */
30
object ModuleTridentBoost : ClientModule("TridentBoost", ModuleCategories.MOVEMENT) {
31
32
    private val horizontalMultiplier by float("HorizontalMultiplier", 2f, 0.1f..5f)
33
    private val verticalMultiplier by float("VerticalMultiplier", 2f, 0.1f..5f)
34
    private val onLand by boolean("OnLand", default = true)
35
36
    @JvmStatic
37
    fun scaleHorizontal(original: Double) = if (running) original * horizontalMultiplier else original
38
39
    @JvmStatic
40
    fun scaleVertical(original: Double) = if (running) original * verticalMultiplier else original
41
42
    @JvmStatic
43
    fun ignoresWaterRequirement() = running && onLand
44
45
}
46