Use direct chunk access for neighbour counts on unload

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2016-05-11 15:59:20 +10:00
parent 3d3e6cdcad
commit d0547bfe77

View File

@ -160,7 +160,7 @@
+ continue; + 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) { + if (neighbor != null) {
+ neighbor.setNeighborUnloaded(-x, -z); + neighbor.setNeighborUnloaded(-x, -z);
+ chunk.setNeighborUnloaded(x, z); + chunk.setNeighborUnloaded(x, z);