Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +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
Dieser Commit ist enthalten in:
Ursprung
1f181040dd
Commit
b68ae39f9a
@ -413,7 +413,7 @@ index 7702fbefa598bce7e6a2d287f7ec36b78a62bff8..f7be94e801e58a39e0efcc813d95bbd6
|
|||||||
public void a() {
|
public void a() {
|
||||||
super.a();
|
super.a();
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
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
|
--- 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
|
||||||
@@ -432,6 +432,26 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -432,6 +432,26 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
@ -461,12 +461,8 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f5
|
|||||||
} // Paper
|
} // Paper
|
||||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||||
return ichunkaccess1;
|
return ichunkaccess1;
|
||||||
@@ -527,13 +551,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -530,10 +554,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
PlayerChunk.State currentChunkState = PlayerChunk.getChunkState(playerchunk.getTicketLevel());
|
if (flag && !currentlyUnloading) {
|
||||||
currentlyUnloading = (oldChunkState.isAtLeast(PlayerChunk.State.BORDER) && !currentChunkState.isAtLeast(PlayerChunk.State.BORDER));
|
|
||||||
}
|
|
||||||
- if (flag && !currentlyUnloading) {
|
|
||||||
+ if (flag) { // Paper - don't care about unloading state
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
|
this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
|
||||||
+ if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper
|
+ if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper
|
||||||
@ -478,7 +474,7 @@ index 7a275bf3260f9fbefc41883c5ebdc1eb2196daf0..81a200ea4c533744890b6e19dd0d83f5
|
|||||||
this.tickDistanceManager();
|
this.tickDistanceManager();
|
||||||
playerchunk = this.getChunk(k);
|
playerchunk = this.getChunk(k);
|
||||||
gameprofilerfiller.exit();
|
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) {
|
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 {
|
@@ -593,7 +624,8 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
return this.serverThreadQueue.executeNext();
|
return this.serverThreadQueue.executeNext();
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren