Skip to content

Commit

Permalink
rule check before chunkregen executing
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Nov 3, 2021
1 parent 273289e commit bc76617
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/carpet/commands/ChunkRegenCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChunkPos> chunks = toBeRegen.get(dimensionType);
Expand All @@ -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<ChunkPos> chunks = toBeRegen.get(dimensionType);
Expand Down

0 comments on commit bc76617

Please sign in to comment.