trail module

trail: Minecraft 26.3 cheat module, full source for every implementation (2 clients: Meteor Client, OfflineClient).

2 implementationsRenderRENDER

Clients with this module

Full module source: 2 implementations

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

Meteor ClientRendersrc/main/java/meteordevelopment/meteorclient/systems/modules/render/Trail.javaJava · 55 lines · 2.1 KB

Renders a customizable trail behind your player.

Settingsparticlespause-when-stationary
Trail.javaJava · Minecraft 26.2 · 55 lines · 2.1 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.render;
7
8
import meteordevelopment.meteorclient.events.world.TickEvent;
9
import meteordevelopment.meteorclient.settings.BoolSetting;
10
import meteordevelopment.meteorclient.settings.ParticleTypeListSetting;
11
import meteordevelopment.meteorclient.settings.Setting;
12
import meteordevelopment.meteorclient.settings.SettingGroup;
13
import meteordevelopment.meteorclient.systems.modules.Categories;
14
import meteordevelopment.meteorclient.systems.modules.Module;
15
import meteordevelopment.orbit.EventHandler;
16
import net.minecraft.core.particles.ParticleOptions;
17
import net.minecraft.core.particles.ParticleType;
18
import net.minecraft.core.particles.ParticleTypes;
19
20
import java.util.List;
21
22
public class Trail extends Module {
23
    private final SettingGroup sgGeneral = settings.getDefaultGroup();
24
25
    private final Setting<List<ParticleType<?>>> particles = sgGeneral.add(new ParticleTypeListSetting.Builder()
26
        .name("particles")
27
        .description("Particles to draw.")
28
        .defaultValue(ParticleTypes.DRIPPING_OBSIDIAN_TEAR, ParticleTypes.CAMPFIRE_COSY_SMOKE)
29
        .build()
30
    );
31
32
    private final Setting<Boolean> pause = sgGeneral.add(new BoolSetting.Builder()
33
        .name("pause-when-stationary")
34
        .description("Whether or not to add particles when you are not moving.")
35
        .defaultValue(true)
36
        .build()
37
    );
38
39
    public Trail() {
40
        super(Categories.Render, "trail", "Renders a customizable trail behind your player.");
41
    }
42
43
    @EventHandler
44
    private void onTick(TickEvent.Post event) {
45
        if (pause.get()
46
            && mc.player.getX() == mc.player.xo
47
            && mc.player.getY() == mc.player.yo
48
            && mc.player.getZ() == mc.player.zo) return;
49
50
        for (ParticleType<?> particleType : particles.get()) {
51
            mc.level.addParticle((ParticleOptions) particleType, mc.player.getX(), mc.player.getY(), mc.player.getZ(), 0, 0, 0);
52
        }
53
    }
54
}
55
OfflineClientRENDERsrc/main/java/com/jellypudding/offlineclient/modules/render/Trail.javaJava · 48 lines · 2.0 KB

Leaves a trail of particles behind you.

SettingsParticlesPause when still
Trail.javaJava · Minecraft 26.2 · 48 lines · 2.0 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.render;
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.BoolSetting;
8
import com.jellypudding.offlineclient.setting.RegistryListSetting;
9
import net.minecraft.core.particles.ParticleOptions;
10
import net.minecraft.core.particles.ParticleType;
11
import net.minecraft.core.particles.ParticleTypes;
12
import net.minecraft.core.registries.BuiltInRegistries;
13
14
import java.util.List;
15
16
// Only particle types that need no extra data can be spawned from their type alone.
17
public final class Trail extends Module {
18
19
    private final RegistryListSetting<ParticleType<?>> particles = new RegistryListSetting<>("Particles",
20
        "The particles left at your feet each tick. Kinds that need a block or colour are skipped.",
21
        BuiltInRegistries.PARTICLE_TYPE,
22
        List.of(ParticleTypes.DRIPPING_OBSIDIAN_TEAR, ParticleTypes.CAMPFIRE_COSY_SMOKE));
23
    private final BoolSetting pauseWhenStill = new BoolSetting("Pause when still",
24
        "Nothing is left whilst you stand in one place.", true);
25
26
    public Trail() {
27
        super("Trail", "Leaves a trail of particles behind you.", Category.RENDER);
28
        addSettings(particles, pauseWhenStill);
29
        searchTags("particles", "footsteps");
30
    }
31
32
    @Subscribe
33
    private void onTick(TickEvent event) {
34
        if (!inGame()) {
35
            return;
36
        }
37
        if (pauseWhenStill.isOn() && mc.player.getX() == mc.player.xo
38
            && mc.player.getY() == mc.player.yo && mc.player.getZ() == mc.player.zo) {
39
            return;
40
        }
41
        for (ParticleType<?> type : particles.resolved()) {
42
            if (type instanceof ParticleOptions options) {
43
                mc.level.addParticle(options, mc.player.getX(), mc.player.getY(), mc.player.getZ(), 0, 0, 0);
44
            }
45
        }
46
    }
47
}
48