Drop RegionFile.chunkExists() in favour of Mojang's own version

By: Geoff Crossland <gcrossland+bukkit@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2017-01-31 23:52:21 +00:00
parent 7baa3d8ac1
commit 0f12ccbdba
4 changed files with 36 additions and 72 deletions

View File

@@ -22,7 +22,7 @@
+ if (this.chunkLoader instanceof ChunkRegionLoader) {
+ loader = (ChunkRegionLoader) this.chunkLoader;
+ }
+ if (loader != null && loader.chunkExists(world, i, j)) {
+ if (loader != null && loader.a(i, j)) {
+ chunk = ChunkIOExecutor.syncChunkLoad(world, loader, this, i, j);
+ }
+ }
@@ -72,7 +72,7 @@
+
+ }
+ // We can only use the queue for already generated chunks
+ if (chunk == null && loader != null && loader.chunkExists(world, i, j)) {
+ if (chunk == null && loader != null && loader.a(i, j)) {
+ if (runnable != null) {
+ ChunkIOExecutor.queueChunkLoad(world, loader, this, i, j, runnable);
+ return null;