3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/ChunkMap.patch

58 Zeilen
1.6 KiB
Diff

2018-07-15 02:00:00 +02:00
--- a/net/minecraft/server/ChunkMap.java
+++ b/net/minecraft/server/ChunkMap.java
@@ -31,6 +31,23 @@
2018-07-15 02:00:00 +02:00
}
}
2018-07-30 05:09:04 +02:00
+ // CraftBukkit start
2018-07-15 02:00:00 +02:00
+ // Update neighbor counts
+ for (int x = -2; x < 3; x++) {
+ for (int z = -2; z < 3; z++) {
+ if (x == 0 && z == 0) {
+ continue;
+ }
+
+ Chunk neighbor = this.get(ChunkCoordIntPair.a(chunkcoordintpair.x + x, chunkcoordintpair.z + z));
+ if (neighbor != null) {
+ neighbor.setNeighborLoaded(-x, -z);
+ chunk.setNeighborLoaded(x, z);
+ }
+ }
+ }
2018-07-30 05:09:04 +02:00
+ // CraftBukkit end
2018-07-15 02:00:00 +02:00
+
return chunk1;
}
@@ -69,23 +86,25 @@
2018-07-15 02:00:00 +02:00
throw new RuntimeException("Not yet implemented");
}
- public Object remove(long i) {
2018-08-26 04:00:00 +02:00
+ // CraftBukkit start - decompile errors
2018-07-15 02:00:00 +02:00
+ public Chunk remove(long i) {
return this.a(i);
}
- public Object put(long i, Object object) {
+ public Chunk put(long i, Chunk object) {
return this.a(i, (Chunk) object);
}
2018-08-26 04:00:00 +02:00
- public Object remove(Object object) {
+ public Chunk remove(Object object) {
return this.a(object);
}
- public Object put(Long olong, Object object) {
+ public Chunk put(Long olong, Chunk object) {
return this.a(olong, (Chunk) object);
}
2018-07-15 02:00:00 +02:00
- public Object put(Object object, Object object1) {
+ public Object put(Object object, Chunk object1) {
return this.a((Long) object, (Chunk) object1);
}
+ // CraftBukkit end
}