mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-12 01:41:05 +01:00
28 lines
1.2 KiB
Diff
28 lines
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
|
|
}
|