diff options
author | Bjarne Koll <[email protected]> | 2024-12-17 20:59:43 +0100 |
---|---|---|
committer | Bjarne Koll <[email protected]> | 2024-12-20 03:07:58 +0100 |
commit | 993db46961dfe7e1a3617795f0df8205ff0b76e7 (patch) | |
tree | 0a003b68b9a03eeffc75e2c8388b6f5092ca14bc | |
parent | 431303ff40cd62ec274eb8d1d6306cced77fb9c4 (diff) | |
download | Paper-993db46961dfe7e1a3617795f0df8205ff0b76e7.tar.gz Paper-993db46961dfe7e1a3617795f0df8205ff0b76e7.zip |
Comment typo
-rw-r--r-- | paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch b/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch index eadab866cb..2ac4d5befd 100644 --- a/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch @@ -57,18 +57,16 @@ private SortedArraySet<Ticket<?>> getTickets(long chunkPos) { return this.tickets.computeIfAbsent(chunkPos, l -> SortedArraySet.create(4)); -@@ -217,8 +_,12 @@ +@@ -217,8 +_,10 @@ ChunkPos chunkPos = sectionPos.chunk(); long packedChunkPos = chunkPos.toLong(); ObjectSet<ServerPlayer> set = this.playersPerChunk.get(packedChunkPos); - set.remove(player); - if (set.isEmpty()) { + // Paper start - some state corruption happens here, don't crash, clean up gracefully -+ if (set != null) { -+ set.remove(player); -+ } ++ if (set != null) set.remove(player); + if (set == null || set.isEmpty()) { -+ // Paper end - some state corruption happens here, don't crash, clean up gracefully ++ // Paper end - some state corruption happens here, don't crash, clean up gracefully this.playersPerChunk.remove(packedChunkPos); this.naturalSpawnChunkCounter.update(packedChunkPos, Integer.MAX_VALUE, false); this.playerTicketManager.update(packedChunkPos, Integer.MAX_VALUE, false); |