potion-saver module

potion-saver: Minecraft 26.3 cheat module, full source for every implementation (1 client: Meteor Client).

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.

Meteor ClientPlayersrc/main/java/meteordevelopment/meteorclient/systems/modules/player/PotionSaver.javaJava · 61 lines · 2.2 KB

Stops potion effects ticking when you stand still.

Settingseffectsonly-when-stationary
PotionSaver.javaJava · Minecraft 26.2 · 61 lines · 2.2 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
3
 * Copyright (c) Meteor Development.
4
 */
5
6
package meteordevelopment.meteorclient.systems.modules.player;
7
8
import meteordevelopment.meteorclient.settings.BoolSetting;
9
import meteordevelopment.meteorclient.settings.Setting;
10
import meteordevelopment.meteorclient.settings.SettingGroup;
11
import meteordevelopment.meteorclient.settings.StatusEffectListSetting;
12
import meteordevelopment.meteorclient.systems.modules.Categories;
13
import meteordevelopment.meteorclient.systems.modules.Module;
14
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
15
import net.minecraft.world.effect.MobEffect;
16
17
import java.util.List;
18
19
import static net.minecraft.world.effect.MobEffects.*;
20
21
public class PotionSaver extends Module {
22
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
23
24
    private final Setting<List<MobEffect>> effects = sgGeneral.add(new StatusEffectListSetting.Builder()
25
        .name("effects")
26
        .description("The effects to preserve.")
27
        .defaultValue(
28
            STRENGTH.value(),
29
            ABSORPTION.value(),
30
            RESISTANCE.value(),
31
            FIRE_RESISTANCE.value(),
32
            SPEED.value(),
33
            HASTE.value(),
34
            REGENERATION.value(),
35
            WATER_BREATHING.value(),
36
            SATURATION.value(),
37
            LUCK.value(),
38
            SLOW_FALLING.value(),
39
            DOLPHINS_GRACE.value(),
40
            CONDUIT_POWER.value(),
41
            HERO_OF_THE_VILLAGE.value()
42
        )
43
        .build()
44
    );
45
46
    public final Setting<Boolean> onlyWhenStationary = sgGeneral.add(new BoolSetting.Builder()
47
        .name("only-when-stationary")
48
        .description("Only freezes effects when you aren't moving.")
49
        .defaultValue(false)
50
        .build()
51
    );
52
53
    public PotionSaver() {
54
        super(Categories.Player, "potion-saver", "Stops potion effects ticking when you stand still.");
55
    }
56
57
    public boolean shouldFreeze(MobEffect effect) {
58
        return isActive() && (!onlyWhenStationary.get() || !PlayerUtils.isMoving()) && !mc.player.getActiveEffects().isEmpty() && effects.get().contains(effect);
59
    }
60
}
61