Commits

md_5 authored e22506f9645
Use direct chunk access for neighbour counts on unload
No tags

nms-patches/ChunkProviderServer.patch

Modified
153 153 + continue;
154 154 + }
155 155 +
156 156 + // Update neighbor counts
157 157 + for (int x = -2; x < 3; x++) {
158 158 + for (int z = -2; z < 3; z++) {
159 159 + if (x == 0 && z == 0) {
160 160 + continue;
161 161 + }
162 162 +
163 -+ Chunk neighbor = this.getLoadedChunkAt(chunk.locX + x, chunk.locZ + z);
163 ++ Chunk neighbor = this.chunks.get(ChunkCoordIntPair.a(chunk.locX + x, chunk.locZ + z));
164 164 + if (neighbor != null) {
165 165 + neighbor.setNeighborUnloaded(-x, -z);
166 166 + chunk.setNeighborUnloaded(x, z);
167 167 + }
168 168 + }
169 169 + }
170 170 + // CraftBukkit end
171 171 +
172 172 chunk.removeEntities();
173 173 this.saveChunk(chunk);
174 174 this.saveChunkNOP(chunk);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut