2018-08-26 18:11:49 +00:00
|
|
|
From 609b90d3e67f3dd186e4cd7fd802a7b53d5da412 Mon Sep 17 00:00:00 2001
|
2018-07-24 02:54:52 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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
|
2018-08-26 18:11:49 +00:00
|
|
|
index 4eb08553c6..404b7d21c2 100644
|
2018-07-24 02:54:52 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2018-08-26 18:11:49 +00:00
|
|
|
@@ -711,6 +711,7 @@ public class Chunk implements IChunkAccess {
|
2018-07-24 03:20:41 +00:00
|
|
|
entity.ag = this.locZ;
|
2018-07-24 02:54:52 +00:00
|
|
|
this.entitySlices[k].add(entity);
|
|
|
|
// Paper start
|
|
|
|
+ this.markDirty();
|
|
|
|
if (entity instanceof EntityItem) {
|
2018-07-24 03:20:41 +00:00
|
|
|
itemCounts[k]++;
|
|
|
|
} else if (entity instanceof IInventory) {
|
2018-08-26 18:11:49 +00:00
|
|
|
@@ -742,6 +743,7 @@ public class Chunk implements IChunkAccess {
|
2018-07-24 03:20:41 +00:00
|
|
|
if (!this.entitySlices[i].remove(entity)) {
|
|
|
|
return;
|
|
|
|
}
|
2018-07-24 02:54:52 +00:00
|
|
|
+ this.markDirty();
|
|
|
|
if (entity instanceof EntityItem) {
|
2018-07-24 03:20:41 +00:00
|
|
|
itemCounts[i]--;
|
|
|
|
} else if (entity instanceof IInventory) {
|
2018-07-24 02:54:52 +00:00
|
|
|
--
|
|
|
|
2.18.0
|
|
|
|
|