ambience module

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

2 implementationsWorldRENDER

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 ClientWorldsrc/main/java/meteordevelopment/meteorclient/systems/modules/world/Ambience.javaJava · 214 lines · 6.9 KB

Change the color of various pieces of the environment.

Settingsend-skycustom-sky-coloroverworld-sky-colornether-sky-colorend-sky-colorcustom-cloud-colorcloud-colorcustom-lightning-colorlightning-colorcustom-grass-colorgrass-colorcustom-foliage-colorfoliage-colorcustom-water-colorwater-colorcustom-lava-colorlava-colorcustom-fog-colorfog-color
Ambience.javaJava · Minecraft 26.2 · 214 lines · 6.9 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.world;
7
8
import meteordevelopment.meteorclient.settings.BoolSetting;
9
import meteordevelopment.meteorclient.settings.ColorSetting;
10
import meteordevelopment.meteorclient.settings.Setting;
11
import meteordevelopment.meteorclient.settings.SettingGroup;
12
import meteordevelopment.meteorclient.systems.modules.Categories;
13
import meteordevelopment.meteorclient.systems.modules.Module;
14
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
15
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
16
17
/**
18
 * @author Walaryne
19
 */
20
public class Ambience extends Module {
21
    private final SettingGroup sgSky = settings.createGroup("Sky");
22
    private final SettingGroup sgWorld = settings.createGroup("World");
23
24
    // Sky
25
26
    public final Setting<Boolean> endSky = sgSky.add(new BoolSetting.Builder()
27
        .name("end-sky")
28
        .description("Makes the sky like the end.")
29
        .defaultValue(false)
30
        .build()
31
    );
32
33
    public final Setting<Boolean> customSkyColor = sgSky.add(new BoolSetting.Builder()
34
        .name("custom-sky-color")
35
        .description("Whether the sky color should be changed.")
36
        .defaultValue(false)
37
        .build()
38
    );
39
40
    public final Setting<SettingColor> overworldSkyColor = sgSky.add(new ColorSetting.Builder()
41
        .name("overworld-sky-color")
42
        .description("The color of the overworld sky.")
43
        .defaultValue(new SettingColor(0, 125, 255))
44
        .visible(customSkyColor::get)
45
        .build()
46
    );
47
48
    public final Setting<SettingColor> netherSkyColor = sgSky.add(new ColorSetting.Builder()
49
        .name("nether-sky-color")
50
        .description("The color of the nether sky.")
51
        .defaultValue(new SettingColor(102, 0, 0))
52
        .visible(customSkyColor::get)
53
        .build()
54
    );
55
56
    public final Setting<SettingColor> endSkyColor = sgSky.add(new ColorSetting.Builder()
57
        .name("end-sky-color")
58
        .description("The color of the end sky.")
59
        .defaultValue(new SettingColor(65, 30, 90))
60
        .visible(customSkyColor::get)
61
        .build()
62
    );
63
64
    public final Setting<Boolean> customCloudColor = sgSky.add(new BoolSetting.Builder()
65
        .name("custom-cloud-color")
66
        .description("Whether the clouds color should be changed.")
67
        .defaultValue(false)
68
        .build()
69
    );
70
71
    public final Setting<SettingColor> cloudColor = sgSky.add(new ColorSetting.Builder()
72
        .name("cloud-color")
73
        .description("The color of the clouds.")
74
        .defaultValue(new SettingColor(102, 0, 0))
75
        .visible(customCloudColor::get)
76
        .build()
77
    );
78
79
    public final Setting<Boolean> changeLightningColor = sgSky.add(new BoolSetting.Builder()
80
        .name("custom-lightning-color")
81
        .description("Whether the lightning color should be changed.")
82
        .defaultValue(false)
83
        .build()
84
    );
85
86
    public final Setting<SettingColor> lightningColor = sgSky.add(new ColorSetting.Builder()
87
        .name("lightning-color")
88
        .description("The color of the lightning.")
89
        .defaultValue(new SettingColor(102, 0, 0))
90
        .visible(changeLightningColor::get)
91
        .build()
92
    );
93
94
    // World
95
    public final Setting<Boolean> customGrassColor = sgWorld.add(new BoolSetting.Builder()
96
        .name("custom-grass-color")
97
        .description("Whether the grass color should be changed.")
98
        .defaultValue(false)
99
        .onChanged(_ -> reload())
100
        .build()
101
    );
102
103
    public final Setting<SettingColor> grassColor = sgWorld.add(new ColorSetting.Builder()
104
        .name("grass-color")
105
        .description("The color of the grass.")
106
        .defaultValue(new SettingColor(102, 0, 0))
107
        .visible(customGrassColor::get)
108
        .onChanged(_ -> reload())
109
        .build()
110
    );
111
112
    public final Setting<Boolean> customFoliageColor = sgWorld.add(new BoolSetting.Builder()
113
        .name("custom-foliage-color")
114
        .description("Whether the foliage color should be changed.")
115
        .defaultValue(false)
116
        .onChanged(_ -> reload())
117
        .build()
118
    );
119
120
    public final Setting<SettingColor> foliageColor = sgWorld.add(new ColorSetting.Builder()
121
        .name("foliage-color")
122
        .description("The color of the foliage.")
123
        .defaultValue(new SettingColor(102, 0, 0))
124
        .visible(customFoliageColor::get)
125
        .onChanged(_ -> reload())
126
        .build()
127
    );
128
129
    public final Setting<Boolean> customWaterColor = sgWorld.add(new BoolSetting.Builder()
130
        .name("custom-water-color")
131
        .description("Whether the water color should be changed.")
132
        .defaultValue(false)
133
        .onChanged(_ -> reload())
134
        .build()
135
    );
136
137
    public final Setting<SettingColor> waterColor = sgWorld.add(new ColorSetting.Builder()
138
        .name("water-color")
139
        .description("The color of the water.")
140
        .defaultValue(new SettingColor(102, 0, 0))
141
        .visible(customWaterColor::get)
142
        .onChanged(_ -> reload())
143
        .build()
144
    );
145
146
    public final Setting<Boolean> customLavaColor = sgWorld.add(new BoolSetting.Builder()
147
        .name("custom-lava-color")
148
        .description("Whether the lava color should be changed.")
149
        .defaultValue(false)
150
        .onChanged(_ -> reload())
151
        .build()
152
    );
153
154
    public final Setting<SettingColor> lavaColor = sgWorld.add(new ColorSetting.Builder()
155
        .name("lava-color")
156
        .description("The color of the lava.")
157
        .defaultValue(new SettingColor(102, 0, 0))
158
        .visible(customLavaColor::get)
159
        .onChanged(_ -> reload())
160
        .build()
161
    );
162
163
    public final Setting<Boolean> customFogColor = sgWorld.add(new BoolSetting.Builder()
164
        .name("custom-fog-color")
165
        .description("Whether the fog color should be changed.")
166
        .defaultValue(false)
167
        .build()
168
    );
169
170
    public final Setting<SettingColor> fogColor = sgWorld.add(new ColorSetting.Builder()
171
        .name("fog-color")
172
        .description("The color of the fog.")
173
        .defaultValue(new SettingColor(102, 0, 0))
174
        .visible(customFogColor::get)
175
        .build()
176
    );
177
178
    public Ambience() {
179
        super(Categories.World, "ambience", "Change the color of various pieces of the environment.");
180
    }
181
182
    @Override
183
    public void onActivate() {
184
        reload();
185
    }
186
187
    @Override
188
    public void onDeactivate() {
189
        reload();
190
    }
191
192
    private void reload() {
193
        if (mc.levelRenderer != null && isActive()) {
194
            mc.levelExtractor.allChanged();
195
        }
196
    }
197
198
    public SettingColor skyColor() {
199
        switch (PlayerUtils.getDimension()) {
200
            case Overworld -> {
201
                return overworldSkyColor.get();
202
            }
203
            case Nether -> {
204
                return netherSkyColor.get();
205
            }
206
            case End -> {
207
                return endSkyColor.get();
208
            }
209
        }
210
211
        return null;
212
    }
213
}
214
OfflineClientRENDERsrc/main/java/com/jellypudding/offlineclient/modules/render/Ambience.javaJava · 192 lines · 6.9 KB

Recolours the sky and the clouds and the ground around you.

SettingsEnd skyCustom sky colourOverworld skyNether skyEnd sky colourCustom cloud colourCloud colourCustom lightning colourLightning colourCustom grass colourGrass colourCustom foliage colourFoliage colourCustom water colourWater colourCustom lava colourLava colourCustom fog colourFog colour
Ambience.javaJava · Minecraft 26.2 · 192 lines · 6.9 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.ColorSetting;
9
import com.jellypudding.offlineclient.util.ChunkRebuild;
10
import net.minecraft.world.level.Level;
11
12
// Recolours the world on your screen only. The mixins ask this what to paint.
13
public final class Ambience extends Module {
14
15
    // Ticks the settings must sit still before the chunks are rebuilt.
16
    private static final int REBUILD_DELAY = 10;
17
18
    private final BoolSetting endSky = new BoolSetting("End sky",
19
        "Draws the End sky box in every dimension.", false);
20
    private final BoolSetting customSky = new BoolSetting("Custom sky colour",
21
        "Paints the sky in colours of your own.", false);
22
    private final ColorSetting overworldSky = new ColorSetting("Overworld sky",
23
        "Sky colour in the overworld.", 210, 1f, 1f, false)
24
        .under(customSky);
25
    private final ColorSetting netherSky = new ColorSetting("Nether sky",
26
        "Sky colour in the nether.", 0, 1f, 0.4f, false)
27
        .under(customSky);
28
    private final ColorSetting endSkyColor = new ColorSetting("End sky colour",
29
        "Sky colour in the end.", 277, 0.67f, 0.35f, false)
30
        .under(customSky);
31
    private final BoolSetting customClouds = new BoolSetting("Custom cloud colour",
32
        "Paints the clouds in a colour of your own.", false);
33
    private final ColorSetting cloudColor = new ColorSetting("Cloud colour",
34
        "Colour of the clouds.", 0, 1f, 0.4f, false)
35
        .under(customClouds);
36
    private final BoolSetting customLightning = new BoolSetting("Custom lightning colour",
37
        "Paints lightning bolts in a colour of your own.", false);
38
    private final ColorSetting lightningColor = new ColorSetting("Lightning colour",
39
        "Colour of a lightning bolt.", 0, 1f, 0.4f, false)
40
        .under(customLightning);
41
    private final BoolSetting customGrass = new BoolSetting("Custom grass colour",
42
        "Paints grass in a colour of your own.", false);
43
    private final ColorSetting grassColor = new ColorSetting("Grass colour",
44
        "Colour of grass.", 0, 1f, 0.4f, false)
45
        .under(customGrass);
46
    private final BoolSetting customFoliage = new BoolSetting("Custom foliage colour",
47
        "Paints leaves and vines in a colour of your own.", false);
48
    private final ColorSetting foliageColor = new ColorSetting("Foliage colour",
49
        "Colour of leaves and vines.", 0, 1f, 0.4f, false)
50
        .under(customFoliage);
51
    private final BoolSetting customWater = new BoolSetting("Custom water colour",
52
        "Paints water in a colour of your own.", false);
53
    private final ColorSetting waterColor = new ColorSetting("Water colour",
54
        "Colour of water.", 0, 1f, 0.4f, false)
55
        .under(customWater);
56
    private final BoolSetting customLava = new BoolSetting("Custom lava colour",
57
        "Paints lava in a colour of your own.", false);
58
    private final ColorSetting lavaColor = new ColorSetting("Lava colour",
59
        "Colour of lava.", 0, 1f, 0.4f, false)
60
        .under(customLava);
61
    private final BoolSetting customFog = new BoolSetting("Custom fog colour",
62
        "Paints the fog in a colour of your own.", false);
63
    private final ColorSetting fogColor = new ColorSetting("Fog colour",
64
        "Colour of the fog.", 0, 1f, 0.4f, false)
65
        .under(customFog);
66
67
    // The block colours only change when a chunk is built again.
68
    private int lastBlockColours;
69
    private int rebuildCooldown;
70
71
    public Ambience() {
72
        super("Ambience", "Recolours the sky and the clouds and the ground around you.",
73
            Category.RENDER);
74
        addSettings(endSky, customSky, overworldSky, netherSky, endSkyColor,
75
            customClouds, cloudColor, customLightning, lightningColor,
76
            customGrass, grassColor, customFoliage, foliageColor,
77
            customWater, waterColor, customLava, lavaColor, customFog, fogColor);
78
        searchTags("sky colour", "cloud colour", "grass colour", "water colour", "fog colour");
79
    }
80
81
    @Override
82
    protected void onEnable() {
83
        lastBlockColours = blockColourKey();
84
        rebuild();
85
    }
86
87
    @Override
88
    protected void onDisable() {
89
        rebuild();
90
    }
91
92
    // The rebuild fires once the colours sit still for half a second.
93
    @Subscribe
94
    private void onTick(TickEvent event) {
95
        int key = blockColourKey();
96
        if (key != lastBlockColours) {
97
            lastBlockColours = key;
98
            rebuildCooldown = REBUILD_DELAY;
99
        } else if (rebuildCooldown > 0 && --rebuildCooldown == 0) {
100
            rebuild();
101
        }
102
    }
103
104
    private int blockColourKey() {
105
        int key = 0;
106
        key = key * 31 + (customGrass.isOn() ? grassColor.getColor() : 0);
107
        key = key * 31 + (customFoliage.isOn() ? foliageColor.getColor() : 0);
108
        key = key * 31 + (customWater.isOn() ? waterColor.getColor() : 0);
109
        key = key * 31 + (customLava.isOn() ? lavaColor.getColor() : 0);
110
        return key;
111
    }
112
113
    private static void rebuild() {
114
        ChunkRebuild.now();
115
    }
116
117
    public boolean drawsEndSky() {
118
        return isEnabled() && endSky.isOn();
119
    }
120
121
    public boolean paintsSky() {
122
        return isEnabled() && customSky.isOn();
123
    }
124
125
    // The colour for the dimension the player is standing in.
126
    public int skyColor() {
127
        if (mc.level == null) {
128
            return overworldSky.getColor();
129
        }
130
        if (mc.level.dimension() == Level.NETHER) {
131
            return netherSky.getColor();
132
        }
133
        return mc.level.dimension() == Level.END ? endSkyColor.getColor() : overworldSky.getColor();
134
    }
135
136
    public boolean paintsClouds() {
137
        return isEnabled() && customClouds.isOn();
138
    }
139
140
    public int cloudColor() {
141
        return cloudColor.getColor();
142
    }
143
144
    public boolean paintsLightning() {
145
        return isEnabled() && customLightning.isOn();
146
    }
147
148
    public int lightningColor() {
149
        return lightningColor.getColor();
150
    }
151
152
    public boolean paintsGrass() {
153
        return isEnabled() && customGrass.isOn();
154
    }
155
156
    public int grassColor() {
157
        return grassColor.getColor();
158
    }
159
160
    public boolean paintsFoliage() {
161
        return isEnabled() && customFoliage.isOn();
162
    }
163
164
    public int foliageColor() {
165
        return foliageColor.getColor();
166
    }
167
168
    public boolean paintsWater() {
169
        return isEnabled() && customWater.isOn();
170
    }
171
172
    public int waterColor() {
173
        return waterColor.getColor();
174
    }
175
176
    public boolean paintsLava() {
177
        return isEnabled() && customLava.isOn();
178
    }
179
180
    public int lavaColor() {
181
        return lavaColor.getColor();
182
    }
183
184
    public boolean paintsFog() {
185
        return isEnabled() && customFog.isOn();
186
    }
187
188
    public int fogColor() {
189
        return fogColor.getColor();
190
    }
191
}
192