Skip to content

Commit 41c2bb7

Browse files
committed
Add name change easter egg when running on snapshots
1 parent 941331f commit 41c2bb7

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/ModernFix.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.embeddedt.modernfix;
22

3+
import net.minecraft.SharedConstants;
34
import net.minecraft.Util;
45
import net.minecraft.server.MinecraftServer;
56
import net.minecraft.server.level.ChunkMap;
@@ -24,6 +25,8 @@ public class ModernFix {
2425

2526
public static final String MODID = "modernfix";
2627

28+
public static String NAME = "ModernFix";
29+
2730
public static ModernFix INSTANCE;
2831

2932
// Used to skip computing the blockstate caches twice
@@ -46,6 +49,8 @@ public static Executor resourceReloadExecutor() {
4649

4750
public ModernFix() {
4851
INSTANCE = this;
52+
if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.snapshot_easter_egg.NameChange") && !SharedConstants.getCurrentVersion().isStable())
53+
NAME = "PreemptiveFix";
4954
ModernFixPlatformHooks.onServerCommandRegister(ModernFixCommands::register);
5055
if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.spam_thread_dump.ThreadDumper")) {
5156
Thread t = new Thread() {

common/src/main/java/org/embeddedt/modernfix/ModernFixClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ModernFixClient() {
4141
// clear reserve as it's not needed
4242
Minecraft.reserve = new byte[0];
4343
if(ModernFixMixinPlugin.instance.isOptionEnabled("feature.branding.F3Screen")) {
44-
brandingString = "ModernFix " + ModernFixPlatformHooks.getVersionString();
44+
brandingString = ModernFix.NAME + " " + ModernFixPlatformHooks.getVersionString();
4545
}
4646
for(String className : ModernFixPlatformHooks.getCustomModOptions().get(IntegrationConstants.CLIENT_INTEGRATION_CLASS)) {
4747
try {

common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ else if(isClientOnly && !ModernFixPlatformHooks.isClient())
152152
.put("mixin.feature.integrated_server_watchdog", true)
153153
.put("mixin.perf.faster_item_rendering", false)
154154
.put("mixin.feature.spam_thread_dump", false)
155+
.put("mixin.feature.snapshot_easter_egg", true)
155156
.put("mixin.perf.blast_search_trees", shouldReplaceSearchTrees)
156157
.put("mixin.devenv", isDevEnv)
157158
.put("mixin.perf.remove_spawn_chunks", isDevEnv)

0 commit comments

Comments
 (0)