From bc766173bb23045e3a64da2314a50bea364c83ac Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Wed, 3 Nov 2021 22:10:27 +0800 Subject: [PATCH] rule check before chunkregen executing --- src/main/java/carpet/commands/ChunkRegenCommand.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/carpet/commands/ChunkRegenCommand.java b/src/main/java/carpet/commands/ChunkRegenCommand.java index 7815613d..a1bfbf83 100644 --- a/src/main/java/carpet/commands/ChunkRegenCommand.java +++ b/src/main/java/carpet/commands/ChunkRegenCommand.java @@ -128,6 +128,10 @@ private static int listChunks(CommandSource source) */ public static boolean skipLoading(DimensionType dimensionType, int chunkX, int chunkZ) { + if (CarpetSettings.commandChunkRegen.equals("false")) + { + return false; + } synchronized (toBeRegen) { Set chunks = toBeRegen.get(dimensionType); @@ -137,6 +141,10 @@ public static boolean skipLoading(DimensionType dimensionType, int chunkX, int c public static void onChunkGenerated(DimensionType dimensionType, int chunkX, int chunkZ) { + if (CarpetSettings.commandChunkRegen.equals("false")) + { + return; + } synchronized (toBeRegen) { Set chunks = toBeRegen.get(dimensionType);