From 413e10660968d6a4ce03ffd138b806ae1ed99fe6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 23 Jul 2018 22:18:31 -0400 Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it saves diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index edae53b82..42b76b212 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -716,6 +716,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.locZ; this.entitySlices[k].add(entity); // Paper start + this.markDirty(); if (entity instanceof EntityItem) { itemCounts[k]++; } else if (entity instanceof IInventory) { @@ -747,6 +748,7 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } + this.markDirty(); if (entity instanceof EntityItem) { itemCounts[i]--; } else if (entity instanceof IInventory) { -- 2.20.1