Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/io/wispforest/owo/Owo.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class Owo implements ModInitializer {
* To override that behavior, add the {@code -Dowo.debug=false} java argument
*/
public static final boolean DEBUG;
public static final boolean PREVENT_DAYLIGHT_CYCLE;
public static final Logger LOGGER = LogManager.getLogger("owo");
private static MinecraftServer SERVER;

Expand All @@ -43,6 +44,7 @@ public class Owo implements ModInitializer {
}

DEBUG = debug;
PREVENT_DAYLIGHT_CYCLE = Boolean.getBoolean("owo.preventDaylightCycle");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class LevelInfoMixin {

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

this.gameRules.get(GameRules.DO_DAYLIGHT_CYCLE).set(false, null);
this.gameRules.get(GameRules.DO_WEATHER_CYCLE).set(false, null);
Expand Down