mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 00:30:25 +01:00
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -712,6 +712,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) {
|
|
@@ -743,6 +744,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.19.1
|
|
|