TimeChanger module

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

1 implementationRENDER

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.

OfflineClientRENDERsrc/main/java/com/jellypudding/offlineclient/modules/render/TimeChanger.javaJava · 42 lines · 1.6 KB

Shows the world at a time of day you pick.

SettingsTimeChange moon phaseMoon phase
TimeChanger.javaJava · Minecraft 26.2 · 42 lines · 1.6 KB · complete file, verbatimOriginal ↗
1
package com.jellypudding.offlineclient.modules.render;
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.EnumSetting;
7
import com.jellypudding.offlineclient.setting.NumberSetting;
8
import net.minecraft.world.level.MoonPhase;
9
10
// ClientClockManagerMixin answers the day clock with this time. The server keeps its own.
11
public final class TimeChanger extends Module {
12
13
    private static final int DAY_LENGTH = 24000;
14
15
    private final NumberSetting time = new NumberSetting("Time",
16
        "Tick of the day to show. Zero is sunrise and eighteen thousand is midnight.",
17
        6000, 0, DAY_LENGTH, 500, " ticks");
18
19
    private final BoolSetting changeMoon = new BoolSetting("Change moon phase",
20
        "Also fixes the moon to a face you pick.", false);
21
    private final EnumSetting<MoonPhase> moon = new EnumSetting<>("Moon phase",
22
        "Which face of the moon hangs in your sky.", MoonPhase.FULL_MOON)
23
        .under(changeMoon);
24
25
    public TimeChanger() {
26
        super("TimeChanger", "Shows the world at a time of day you pick.", Category.RENDER);
27
        addSettings(time, changeMoon, moon);
28
        searchTags("day", "night", "time of day", "moon");
29
    }
30
31
    @Override
32
    public String getSuffix() {
33
        return time.getValueString();
34
    }
35
36
    // The phase is the day count. A whole day is added per step.
37
    public long clockTime() {
38
        long day = time.getInt() % DAY_LENGTH;
39
        return changeMoon.isOn() ? moon.getValue().startTick() + day : day;
40
    }
41
}
42