SPIGOT-6086: Twisting vines growing at top of world crashes server

This commit is contained in:
md_5 2020-08-20 18:48:38 +10:00
parent 59a0bafa4d
commit 8abed406ce
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -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<Either<IChunkAccess, PlayerChunk.Failure>> 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;