Fix unload stall

Also added required tickets that should not be removed during
shutdown
This commit is contained in:
Spottedleaf
2022-02-28 18:33:20 -08:00
parent 7900a59466
commit 13a4b2f382
5 changed files with 50 additions and 1 deletions

View File

@@ -5486,6 +5486,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
protected void purgeStaleTickets() {
@@ -0,0 +0,0 @@ public abstract class DistanceManager {
}
public void removeTicketsOnClosing() {
- ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT, TicketType.LIGHT);
+ ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT, TicketType.LIGHT, TicketType.FUTURE_AWAIT); // Paper - add additional tickets to preserve
ObjectIterator objectiterator = this.tickets.long2ObjectEntrySet().fastIterator();
while (objectiterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java