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

@@ -1784,7 +1784,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper - replace player chunk loader
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, TicketType.ASYNC_LOAD, TicketType.REQUIRED_LOAD, TicketType.CHUNK_RELIGHT, ca.spottedleaf.starlight.common.light.StarLightInterface.CHUNK_WORK_TICKET); // Paper - add additional tickets to preserve
@@ -0,0 +0,0 @@ public abstract class DistanceManager {
if (!immutableset.contains(ticket.getType())) {
iterator.remove();
@@ -1796,6 +1796,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (flag) {
- this.ticketTracker.update(entry.getLongKey(), DistanceManager.getTicketLevelAt((SortedArraySet) entry.getValue()), false);
+ this.updateTicketLevel(entry.getLongKey(), getTicketLevelAt(entry.getValue())); // Paper - replace ticket level propagator
+ // this.ticketTracker.update(entry.getLongKey(), DistanceManager.getTicketLevelAt((SortedArraySet) entry.getValue()), false); // Paper - no longer used
}