2019-04-22 21:36:14 +00:00
|
|
|
From 1219243ef0beb650d17ea1073f32e1100a3102ed 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
|
2019-04-06 03:08:45 +00:00
|
|
|
index e8c06e01b4..5d187e5d7d 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
|
2019-04-06 03:08:45 +00:00
|
|
|
@@ -718,6 +718,7 @@ public class Chunk implements IChunkAccess {
|
2018-12-17 05:18:06 +00:00
|
|
|
entity.chunkZ = 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) {
|
2019-04-06 03:08:45 +00:00
|
|
|
@@ -748,6 +749,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
|
|
|
--
|
2019-03-20 01:46:00 +00:00
|
|
|
2.21.0
|
2018-07-24 02:54:52 +00:00
|
|
|
|