From f00242079c8d5d2fccde794296ceb57ed2b9abaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Kosman?= Date: Sat, 24 Aug 2024 23:25:54 +0200 Subject: style: change gamerule name because borders can also grow instead of shrinking --- src/main/java/world/anhgelus/molehunt/Molehunt.java | 6 +++--- src/main/java/world/anhgelus/molehunt/config/Config.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main') diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java index 450666a..52399dc 100644 --- a/src/main/java/world/anhgelus/molehunt/Molehunt.java +++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java @@ -89,10 +89,10 @@ public class Molehunt implements ModInitializer { GameRules.Category.MISC, GameRuleFactory.createIntRule(CONFIG_FILE.getOrDefault("final_world_size", 50), 0) ); - public static final GameRules.Key SHRINKING_STARTING_TIME_OFFSET = GameRuleRegistry.register( - MOD_ID +":borderShrinkingStartingTimeOffsetMinutes", + public static final GameRules.Key MOVING_STARTING_TIME_OFFSET = GameRuleRegistry.register( + MOD_ID +":borderMovingStartingTimeOffsetMinutes", GameRules.Category.MISC, - GameRuleFactory.createIntRule(CONFIG_FILE.getOrDefault("border_shrinking_starting_time_offset", 10), 0) + GameRuleFactory.createIntRule(CONFIG_FILE.getOrDefault("border_moving_starting_time_offset", 10), 0) ); public Game game; diff --git a/src/main/java/world/anhgelus/molehunt/config/Config.java b/src/main/java/world/anhgelus/molehunt/config/Config.java index 3f22df3..e1c84a4 100644 --- a/src/main/java/world/anhgelus/molehunt/config/Config.java +++ b/src/main/java/world/anhgelus/molehunt/config/Config.java @@ -57,7 +57,7 @@ public class Config { } public int getBorderShrinkingStartingTimeOffset() { - return server.getGameRules().getInt(Molehunt.SHRINKING_STARTING_TIME_OFFSET); + return server.getGameRules().getInt(Molehunt.MOVING_STARTING_TIME_OFFSET); } public static SimpleConfig configFile(String fileName) { @@ -112,11 +112,11 @@ public class Config { # Default: 50 blocks. final_world_size = 50 - # Shrinking starting offset (in minutes) - # The time before starting to shrink the world borders. - # If this value is greater than the game duration, borders will never shrink. + # Moving starting time offset (in minutes) + # The time before starting to move the world borders. + # If this value is greater than the game duration, borders will never move. # Default: 10 minutes. - border_shrinking_starting_time_offset = 10 + border_moving_starting_time_offset = 10 """; } } -- cgit v1.2.3