SPIGOT-4137: Fix World.regenerateChunk

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-25 19:32:06 +10:00
parent 64f2fdae29
commit c3205e4e12
3 changed files with 35 additions and 9 deletions

View File

@@ -57,16 +57,31 @@
}
}
@@ -150,7 +162,7 @@
@@ -147,10 +159,21 @@
return this.g.c();
}
+ // CraftBukkit start
public CompletableFuture<Chunk> generateChunk(int i, int j) {
+ return this.generateChunk(i, j, false);
+ }
+
+ public CompletableFuture<Chunk> generateChunk(int i, int j, boolean force) {
this.g.b();
this.g.a(new ChunkCoordIntPair(i, j));
- this.g.a(new ChunkCoordIntPair(i, j));
- CompletableFuture completablefuture = this.g.c();
+
+ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
+ if (force) {
+ this.f.forcePolluteCache(chunkcoordintpair);
+ }
+ this.g.a(chunkcoordintpair);
+ // CraftBukkit end
+ CompletableFuture<ProtoChunk> completablefuture = this.g.c(); // CraftBukkit - decompile error
return completablefuture.thenApply(this::a);
}
@@ -268,10 +280,12 @@
@@ -268,10 +291,12 @@
Chunk chunk = (Chunk) this.chunks.get(olong);
if (chunk != null && chunk.d) {
@@ -83,7 +98,7 @@
++i;
}
}
@@ -284,6 +298,40 @@
@@ -284,6 +309,40 @@
return false;
}