mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Revert a change made to getChunkFuture for isUnloading
Talked with leaf on it and understand what its going now even though it was a hack fix by Spigot, but seems ok. I had orig made this change thinking it was the source of another issue but that came out to not be true. Fixes #3573
This commit is contained in:
parent
1f181040dd
commit
b68ae39f9a
1 changed files with 4 additions and 13 deletions
|
@ -413,7 +413,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..f7be94e801e58a39e0efcc813d95bbd6
|
|||
public void a() {
|
||||
super.a();
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f57351906c 100644
|
||||
index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..b6a7e475c6ebe499c641db5967adb1674323a517 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -432,6 +432,26 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -461,12 +461,8 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f5
|
|||
} // Paper
|
||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
return ichunkaccess1;
|
||||
@@ -527,13 +551,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
PlayerChunk.State currentChunkState = PlayerChunk.getChunkState(playerchunk.getTicketLevel());
|
||||
currentlyUnloading = (oldChunkState.isAtLeast(PlayerChunk.State.BORDER) && !currentChunkState.isAtLeast(PlayerChunk.State.BORDER));
|
||||
}
|
||||
- if (flag && !currentlyUnloading) {
|
||||
+ if (flag) { // Paper - don't care about unloading state
|
||||
@@ -530,10 +554,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
if (flag && !currentlyUnloading) {
|
||||
// CraftBukkit end
|
||||
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
|
||||
+ if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper
|
||||
|
@ -478,7 +474,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f5
|
|||
this.tickDistanceManager();
|
||||
playerchunk = this.getChunk(k);
|
||||
gameprofilerfiller.exit();
|
||||
@@ -542,12 +568,17 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -542,8 +568,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -494,11 +490,6 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f5
|
|||
}
|
||||
|
||||
private boolean a(@Nullable PlayerChunk playerchunk, int i) {
|
||||
- return playerchunk == null || playerchunk.oldTicketLevel > i; // CraftBukkit using oldTicketLevel for isLoaded checks
|
||||
+ return playerchunk == null || playerchunk.getTicketLevel() > i; // CraftBukkit using oldTicketLevel for isLoaded checks - Paper - keep vanilla check
|
||||
}
|
||||
|
||||
public boolean isLoaded(int i, int j) {
|
||||
@@ -593,7 +624,8 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
return this.serverThreadQueue.executeNext();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue