2018-10-23 01:16:21 +02:00
|
|
|
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
|
2018-07-24 04:54:52 +02: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-10-23 01:16:21 +02:00
|
|
|
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
2018-07-24 04:54:52 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2018-10-23 01:16:21 +02:00
|
|
|
@@ -712,6 +712,7 @@ public class Chunk implements IChunkAccess {
|
2018-07-24 05:20:41 +02:00
|
|
|
entity.ag = this.locZ;
|
2018-07-24 04:54:52 +02:00
|
|
|
this.entitySlices[k].add(entity);
|
|
|
|
// Paper start
|
|
|
|
+ this.markDirty();
|
|
|
|
if (entity instanceof EntityItem) {
|
2018-07-24 05:20:41 +02:00
|
|
|
itemCounts[k]++;
|
|
|
|
} else if (entity instanceof IInventory) {
|
2018-10-23 01:16:21 +02:00
|
|
|
@@ -743,6 +744,7 @@ public class Chunk implements IChunkAccess {
|
2018-07-24 05:20:41 +02:00
|
|
|
if (!this.entitySlices[i].remove(entity)) {
|
|
|
|
return;
|
|
|
|
}
|
2018-07-24 04:54:52 +02:00
|
|
|
+ this.markDirty();
|
|
|
|
if (entity instanceof EntityItem) {
|
2018-07-24 05:20:41 +02:00
|
|
|
itemCounts[i]--;
|
|
|
|
} else if (entity instanceof IInventory) {
|
2018-07-24 04:54:52 +02:00
|
|
|
--
|
2018-10-23 01:16:21 +02:00
|
|
|
2.19.1
|
2018-07-24 04:54:52 +02:00
|
|
|
|