mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
Fix missing flag pass for isUrgent
This commit is contained in:
@@ -2406,7 +2406,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> bringToStatusAsync(int x, int z, ChunkCoordIntPair chunkPos, ChunkStatus status, boolean isUrgent) {
|
+ 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++);
|
+ Long identifier = Long.valueOf(this.asyncLoadSeqCounter++);
|
||||||
+ int ticketLevel = MCUtil.getTicketLevelFor(status);
|
+ int ticketLevel = MCUtil.getTicketLevelFor(status);
|
||||||
+ this.addTicketAtLevel(TicketType.ASYNC_LOAD, chunkPos, ticketLevel, identifier);
|
+ this.addTicketAtLevel(TicketType.ASYNC_LOAD, chunkPos, ticketLevel, identifier);
|
||||||
@@ -2446,7 +2446,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
||||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -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
|
if (!completablefuture.isDone()) { // Paper
|
||||||
+ // Paper start - async chunk io/loading
|
+ // Paper start - async chunk io/loading
|
||||||
@@ -2459,6 +2463,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.world.timings.syncChunkLoad.stopTiming(); // Paper
|
this.world.timings.syncChunkLoad.stopTiming(); // Paper
|
||||||
} // Paper
|
} // Paper
|
||||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
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 {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
protected boolean executeNext() {
|
protected boolean executeNext() {
|
||||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
// 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
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/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 {
|
@@ -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
|
if (!completablefuture.isDone()) { // Paper
|
||||||
// Paper start - async chunk io/loading
|
// Paper start - async chunk io/loading
|
||||||
@@ -46,18 +41,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||||
return ichunkaccess1;
|
return ichunkaccess1;
|
||||||
}, (playerchunk_failure) -> {
|
}, (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 {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user