diff --git a/nms-patches/PlayerChunk.patch b/nms-patches/PlayerChunk.patch index e0445c3fbc..6259d805e2 100644 --- a/nms-patches/PlayerChunk.patch +++ b/nms-patches/PlayerChunk.patch @@ -37,7 +37,15 @@ } @Nullable -@@ -216,7 +225,7 @@ +@@ -114,6 +123,7 @@ + if (chunk != null) { + byte b0 = (byte) SectionPosition.a(blockposition.getY()); + ++ if (b0 >= this.dirtyBlocks.length) return; // CraftBukkit - SPIGOT-6086 + if (this.dirtyBlocks[b0] == null) { + this.p = true; + this.dirtyBlocks[b0] = new ShortArraySet(); +@@ -216,7 +226,7 @@ CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(i); if (completablefuture != null) { @@ -46,7 +54,7 @@ if (either == null || either.left().isPresent()) { return completablefuture; -@@ -271,6 +280,30 @@ +@@ -271,6 +281,30 @@ boolean flag1 = this.ticketLevel <= PlayerChunkMap.GOLDEN_TICKET; PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel); PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel); @@ -77,7 +85,7 @@ CompletableFuture completablefuture; if (flag) { -@@ -302,7 +335,7 @@ +@@ -302,7 +336,7 @@ if (flag2 && !flag3) { completablefuture = this.fullChunkFuture; this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; @@ -86,7 +94,7 @@ playerchunkmap.getClass(); return either1.ifLeft(playerchunkmap::a); })); -@@ -340,6 +373,26 @@ +@@ -340,6 +374,26 @@ this.u.a(this.location, this::k, this.ticketLevel, this::d); this.oldTicketLevel = this.ticketLevel;