Skip to content

Commit 3f55506

Browse files
committed
Require opt in for preventing daylight cycle for worlds
1 parent 478c7f7 commit 3f55506

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/io/wispforest/owo/Owo.java

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class Owo implements ModInitializer {
2525
* To override that behavior, add the {@code -Dowo.debug=false} java argument
2626
*/
2727
public static final boolean DEBUG;
28+
public static final boolean PREVENT_DAYLIGHT_CYCLE;
2829
public static final Logger LOGGER = LogManager.getLogger("owo");
2930
private static MinecraftServer SERVER;
3031

@@ -43,6 +44,7 @@ public class Owo implements ModInitializer {
4344
}
4445

4546
DEBUG = debug;
47+
PREVENT_DAYLIGHT_CYCLE = Boolean.getBoolean("owo.preventDaylightCycle");
4648
}
4749

4850
@Override

src/main/java/io/wispforest/owo/mixin/tweaks/LevelInfoMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class LevelInfoMixin {
2323

2424
@Inject(method = "<init>", at = @At("TAIL"))
2525
private void simulationIsForNerds(String name, GameMode gameMode, boolean hardcore, Difficulty difficulty, boolean allowCommands, GameRules gameRules, DataConfiguration dataConfiguration, CallbackInfo ci) {
26-
if (!(Owo.DEBUG && FabricLoader.getInstance().isDevelopmentEnvironment())) return;
26+
if (!(Owo.DEBUG && Owo.PREVENT_DAYLIGHT_CYCLE && FabricLoader.getInstance().isDevelopmentEnvironment())) return;
2727

2828
this.gameRules.get(GameRules.DO_DAYLIGHT_CYCLE).set(false, null);
2929
this.gameRules.get(GameRules.DO_WEATHER_CYCLE).set(false, null);

0 commit comments

Comments
 (0)