mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Fix missing flag pass for isUrgent
This commit is contained in:
parent
6df55d9c05
commit
80a570d89f
2 changed files with 18 additions and 19 deletions
|
@ -2406,7 +2406,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> bringToStatusAsync(int x, int z, ChunkCoordIntPair chunkPos, ChunkStatus status, boolean isUrgent) {
|
||||
+ CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> future = this.getChunkFutureMainThread(x, z, status, true);
|
||||
+ CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> future = this.getChunkFutureMainThread(x, z, status, true, isUrgent);
|
||||
+ Long identifier = Long.valueOf(this.asyncLoadSeqCounter++);
|
||||
+ int ticketLevel = MCUtil.getTicketLevelFor(status);
|
||||
+ this.addTicketAtLevel(TicketType.ASYNC_LOAD, chunkPos, ticketLevel, identifier);
|
||||
|
@ -2446,7 +2446,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
|
||||
}
|
||||
|
||||
gameprofilerfiller.c("getChunkCacheMiss");
|
||||
- CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
|
||||
+ CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag, true); // Paper
|
||||
|
||||
if (!completablefuture.isDone()) { // Paper
|
||||
+ // Paper start - async chunk io/loading
|
||||
|
@ -2459,6 +2463,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.world.timings.syncChunkLoad.stopTiming(); // Paper
|
||||
} // Paper
|
||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
+ // Paper start - add isUrgent - old sig left in place for dirty nms plugins
|
||||
+ return getChunkFutureMainThread(i, j, chunkstatus, flag, false);
|
||||
+ }
|
||||
+ private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag, boolean isUrgent) {
|
||||
+ // Paper end
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||
long k = chunkcoordintpair.pair();
|
||||
int l = 33 + ChunkStatus.a(chunkstatus);
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
protected boolean executeNext() {
|
||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||
|
|
|
@ -20,11 +20,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
gameprofilerfiller.c("getChunkCacheMiss");
|
||||
- CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
|
||||
+ CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag, true); // Paper
|
||||
|
||||
if (!completablefuture.isDone()) { // Paper
|
||||
// Paper start - async chunk io/loading
|
||||
|
@ -46,18 +41,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
}, (playerchunk_failure) -> {
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
+ // Paper start
|
||||
+ return getChunkFutureMainThread(i, j, chunkstatus, flag, false);
|
||||
+ }
|
||||
+ private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag, boolean isUrgent) {
|
||||
+ // Paper end
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||
long k = chunkcoordintpair.pair();
|
||||
int l = 33 + ChunkStatus.a(chunkstatus);
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue