diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index e40622e946..935a07d801 100644 --- a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch @@ -119,12 +119,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.world.level.chunk.ChunkConverter; import net.minecraft.world.level.chunk.ChunkGenerator; @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities - boolean needsRemoval = false; - if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof net.minecraft.world.entity.npc.NPC) { -- entity.die(); -+ entity.dead = true; // Paper - needsRemoval = true; + if (chunk.needsDecoration) { + net.minecraft.server.dedicated.DedicatedServer server = this.world.getServer().getServer(); + if (!server.getSpawnNPCs() && entity instanceof net.minecraft.world.entity.npc.NPC) { +- entity.die(); ++ entity.dead = true; // Paper + needsRemoval = true; + } + + if (!server.getSpawnAnimals() && (entity instanceof net.minecraft.world.entity.animal.EntityAnimal || entity instanceof net.minecraft.world.entity.animal.EntityWaterAnimal)) { +- entity.die(); ++ entity.dead = true; // Paper + needsRemoval = true; + } } - - if (!(entity instanceof EntityHuman) && (needsRemoval || !this.world.addEntityChunk(entity))) { diff --git a/work/CraftBukkit b/work/CraftBukkit index d28f36c684..e1a6197ecb 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d28f36c68405c1815857139e613a1098f4168029 +Subproject commit e1a6197ecb02b30fef3263d5802610f176eae2d6