3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/removed/1.17/0250-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch
2021-06-13 00:45:00 +01:00

29 Zeilen
1.2 KiB
Diff

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
Useless in 1.17 - leaf
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
}