PaperMC/patches/removed/1.17/0250-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch

29 lines
1.2 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 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
2021-06-13 01:45:00 +02:00
Useless in 1.17 - leaf
2021-06-11 14:02:28 +02:00
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index d69ccb1f31f31ebeee477df20ce1410f9e485eb7..bd9b19d988ecf72e099efeff6ec3483a352174ec 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -559,6 +559,7 @@ public class LevelChunk implements ChunkAccess {
entity.zChunk = this.chunkPos.z;
this.entities.add(entity); // Paper - per chunk entity list
this.entitySlices[k].add(entity);
+ this.markUnsaved(); // Paper
}
@Override
@@ -587,6 +588,7 @@ public class LevelChunk implements ChunkAccess {
return;
}
entityCounts.decrement(entity.getMinecraftKeyString());
+ this.markUnsaved(); // Paper
// Paper end
this.entities.remove(entity); // Paper
}