mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 09:16:06 +01:00
SPIGOT-6086: Twisting vines growing at top of world crashes server
By: md_5 <git@md-5.net>
This commit is contained in:
parent
1511bbcc2c
commit
634b782744
1 changed files with 12 additions and 4 deletions
|
@ -37,7 +37,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@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);
|
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(i);
|
||||||
|
|
||||||
if (completablefuture != null) {
|
if (completablefuture != null) {
|
||||||
|
@ -46,7 +54,7 @@
|
||||||
|
|
||||||
if (either == null || either.left().isPresent()) {
|
if (either == null || either.left().isPresent()) {
|
||||||
return completablefuture;
|
return completablefuture;
|
||||||
@@ -271,6 +280,30 @@
|
@@ -271,6 +281,30 @@
|
||||||
boolean flag1 = this.ticketLevel <= PlayerChunkMap.GOLDEN_TICKET;
|
boolean flag1 = this.ticketLevel <= PlayerChunkMap.GOLDEN_TICKET;
|
||||||
PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel);
|
PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel);
|
||||||
PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel);
|
PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel);
|
||||||
|
@ -77,7 +85,7 @@
|
||||||
CompletableFuture completablefuture;
|
CompletableFuture completablefuture;
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -302,7 +335,7 @@
|
@@ -302,7 +336,7 @@
|
||||||
if (flag2 && !flag3) {
|
if (flag2 && !flag3) {
|
||||||
completablefuture = this.fullChunkFuture;
|
completablefuture = this.fullChunkFuture;
|
||||||
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||||
|
@ -86,7 +94,7 @@
|
||||||
playerchunkmap.getClass();
|
playerchunkmap.getClass();
|
||||||
return either1.ifLeft(playerchunkmap::a);
|
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.u.a(this.location, this::k, this.ticketLevel, this::d);
|
||||||
this.oldTicketLevel = this.ticketLevel;
|
this.oldTicketLevel = this.ticketLevel;
|
||||||
|
|
Loading…
Add table
Reference in a new issue