diff --git a/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldConfig.java b/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldConfig.java index c33a23c..069a0bc 100644 --- a/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldConfig.java +++ b/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldConfig.java @@ -29,6 +29,7 @@ public final class RuntimeWorldConfig { private long timeOfDay = 6000; private Difficulty difficulty = Difficulty.NORMAL; private final GameRuleStore gameRules = new GameRuleStore(); + private boolean mirrorOverworldGameRules = false; private RuntimeWorld.Constructor worldConstructor = RuntimeWorld::new; private int sunnyTime = Integer.MAX_VALUE; @@ -97,6 +98,11 @@ public RuntimeWorldConfig setGameRule(GameRules.Key key, int return this; } + public RuntimeWorldConfig setMirrorOverworldGameRules(boolean mirror) { + this.mirrorOverworldGameRules = mirror; + return this; + } + public RuntimeWorldConfig setSunny(int sunnyTime) { this.sunnyTime = sunnyTime; this.raining = false; @@ -178,6 +184,10 @@ public GameRuleStore getGameRules() { return this.gameRules; } + public boolean shouldMirrorOverworldGameRules(){ + return this.mirrorOverworldGameRules; + } + public int getSunnyTime() { return this.sunnyTime; } diff --git a/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldProperties.java b/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldProperties.java index 6ce4f93..66237ba 100644 --- a/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldProperties.java +++ b/src/main/java/xyz/nucleoid/fantasy/RuntimeWorldProperties.java @@ -19,6 +19,8 @@ public RuntimeWorldProperties(SaveProperties saveProperties, RuntimeWorldConfig @Override public GameRules getGameRules() { + if (this.config.shouldMirrorOverworldGameRules()) + return super.getGameRules(); return this.rules; }