2018-07-27 11:57:31 +08:00
|
|
|
From 6ea5914741d70c9656d108d609a4378a903e087e Mon Sep 17 00:00:00 2001
|
2018-07-24 10:54:52 +08: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-07-27 11:57:31 +08:00
|
|
|
index 7a62fae332..eaee492010 100644
|
2018-07-24 10:54:52 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
@@ -683,6 +683,7 @@ public class Chunk {
|
|
|
|
entity.ad = this.locZ;
|
|
|
|
this.entitySlices[k].add(entity);
|
|
|
|
// Paper start
|
|
|
|
+ this.markDirty();
|
|
|
|
entity.setCurrentChunk(this);
|
2018-07-27 11:57:31 +08:00
|
|
|
entityCounts.increment(entity.getMinecraftKeyString());
|
2018-07-24 10:54:52 +08:00
|
|
|
if (entity instanceof EntityItem) {
|
|
|
|
@@ -725,6 +726,7 @@ public class Chunk {
|
|
|
|
|
|
|
|
// Paper start
|
|
|
|
if (!this.entitySlices[i].remove(entity)) { return; }
|
|
|
|
+ this.markDirty();
|
|
|
|
entity.setCurrentChunk(null);
|
2018-07-27 11:57:31 +08:00
|
|
|
entityCounts.decrement(entity.getMinecraftKeyString());
|
2018-07-24 10:54:52 +08:00
|
|
|
if (entity instanceof EntityItem) {
|
|
|
|
--
|
|
|
|
2.18.0
|
|
|
|
|