From f213c595ea36e2936111b4a2e68ad183208d1f0d 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 724c1f5720..67e2158ca1 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -714,6 +714,7 @@ public class Chunk implements IChunkAccess { entity.ag = this.locZ; this.entitySlices[k].add(entity); // Paper start + this.markDirty(); if (entity instanceof EntityItem) { itemCounts[k]++; } else if (entity instanceof IInventory) { @@ -745,6 +746,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.18.0