diff --git a/paper-server/nms-patches/net/minecraft/world/level/chunk/Chunk.patch b/paper-server/nms-patches/net/minecraft/world/level/chunk/Chunk.patch index 99062f1fe0..613658f2be 100644 --- a/paper-server/nms-patches/net/minecraft/world/level/chunk/Chunk.patch +++ b/paper-server/nms-patches/net/minecraft/world/level/chunk/Chunk.patch @@ -104,7 +104,20 @@ } } -@@ -541,6 +576,50 @@ +@@ -494,6 +529,12 @@ + if (this.E()) { + TileEntity tileentity = (TileEntity) this.blockEntities.remove(blockposition); + ++ // CraftBukkit start - SPIGOT-5561: Also remove from pending map ++ if (!pendingBlockEntities.isEmpty()) { ++ pendingBlockEntities.remove(blockposition); ++ } ++ // CraftBukkit end ++ + if (tileentity != null) { + this.c(tileentity); + tileentity.aa_(); +@@ -541,6 +582,50 @@ } @@ -155,7 +168,7 @@ public void markDirty() { this.unsaved = true; } -@@ -664,7 +743,7 @@ +@@ -664,7 +749,7 @@ @Override public boolean isNeedsSaving() { @@ -164,7 +177,7 @@ } @Nullable -@@ -795,7 +874,7 @@ +@@ -795,7 +880,7 @@ public void B() { if (this.blockTicks instanceof ProtoChunkTickList) { @@ -173,7 +186,7 @@ return this.getType(blockposition).getBlock(); }); this.blockTicks = TickListEmpty.b(); -@@ -805,7 +884,7 @@ +@@ -805,7 +890,7 @@ } if (this.liquidTicks instanceof ProtoChunkTickList) { @@ -182,7 +195,7 @@ return this.getFluid(blockposition).getType(); }); this.liquidTicks = TickListEmpty.b(); -@@ -819,14 +898,14 @@ +@@ -819,14 +904,14 @@ public void a(WorldServer worldserver) { RegistryBlocks registryblocks; @@ -199,7 +212,7 @@ registryblocks = IRegistry.FLUID; Objects.requireNonNull(registryblocks); this.liquidTicks = new TickListChunk<>(registryblocks::getKey, worldserver.getFluidTickList().a(this.chunkPos, true, false), worldserver.getTime()); -@@ -899,7 +978,7 @@ +@@ -899,7 +984,7 @@ private void f(T t0) { IBlockData iblockdata = t0.getBlock(); @@ -208,7 +221,7 @@ if (blockentityticker == null) { this.l(t0.getPosition()); -@@ -978,7 +1057,7 @@ +@@ -978,7 +1063,7 @@ private boolean loggedInvalidBlockState; a(TileEntity tileentity, BlockEntityTicker blockentityticker) { @@ -217,7 +230,7 @@ this.ticker = blockentityticker; } -@@ -1001,7 +1080,7 @@ +@@ -1001,7 +1086,7 @@ this.loggedInvalidBlockState = true; Chunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new org.apache.logging.log4j.util.Supplier[]{this::d, this::c, () -> { return iblockdata;