Use direct chunk access for neighbour counts on unload

This commit is contained in:
md_5 committed 2016-05-11 16:01:17 +10:00
1 parent 7e9122e74d
commit e22506f964
1 file changed
+1 -1
+1 -1
View File
@@ -160,7 +160,7 @@
+ continue;
+ }
+
+ Chunk neighbor = this.getLoadedChunkAt(chunk.locX + x, chunk.locZ + z);
+ Chunk neighbor = this.chunks.get(ChunkCoordIntPair.a(chunk.locX + x, chunk.locZ + z));
+ if (neighbor != null) {
+ neighbor.setNeighborUnloaded(-x, -z);
+ chunk.setNeighborUnloaded(x, z);