From 2c7435585d08147a806ca5c3307eaf8b0e775c17 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Fri, 11 Jul 2014 15:44:01 -0400 Subject: [PATCH] Minor Changes Removed a pointless check in yCoordHelper and corrected some comments in RiftRegenerator. It turns out that ChunkProviderServer.chunkExists() returns whether a chunk is loaded, not whether it has already been created. --- .../StevenDimDoors/mod_pocketDim/helpers/yCoordHelper.java | 5 +---- .../mod_pocketDim/ticking/RiftRegenerator.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/helpers/yCoordHelper.java b/src/main/java/StevenDimDoors/mod_pocketDim/helpers/yCoordHelper.java index 3810c8b9..26aa1788 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/helpers/yCoordHelper.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/helpers/yCoordHelper.java @@ -215,10 +215,7 @@ public class yCoordHelper { for (int dz = -1; dz <= 1; dz++) { - if (!provider.chunkExists(chunkX + dx, chunkZ + dz)) - { - provider.loadChunk(chunkX, chunkZ); - } + provider.loadChunk(chunkX, chunkZ); } } return target; diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java b/src/main/java/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java index 66bdd1d9..f23c38c3 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java @@ -95,8 +95,8 @@ public class RiftRegenerator implements IRegularTickReceiver { return; // The chunk at the given location must be loaded. - // FIXME: I can't figure out how to check if a chunk is loaded. - // Will only check if the chunk exists for now. This isn't a big deal. --SenseiKiwi + // Note: ChunkProviderServer.chunkExists() returns whether a chunk is + // loaded, not whether it has already been created. if (!world.getChunkProvider().chunkExists(x >> 4, z >> 4)) return;