3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 20:40:07 +01:00
Paper/Spigot-Server-Patches/0253-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch
Aikar b6925c36af
Remove no longer needed undead horse leash patch
This is now default vanilla behavior

Fixes #3644
2020-06-28 04:35:41 -04:00

28 Zeilen
1.1 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
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index fdc02b512f2d4bc968977564d520bc7ec7189c69..a27f91e6c3d1f5dd0adf8a3b48a640cc63676114 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -519,6 +519,7 @@ public class Chunk implements IChunkAccess {
entity.chunkZ = this.loc.z;
this.entities.add(entity); // Paper - per chunk entity list
this.entitySlices[k].add(entity);
+ this.markDirty(); // Paper
}
@Override
@@ -546,6 +547,7 @@ public class Chunk implements IChunkAccess {
return;
}
entityCounts.decrement(entity.getMinecraftKeyString());
+ this.markDirty(); // Paper
// Paper end
this.entities.remove(entity); // Paper
}