From 0248c23203c4c67dfa8b0490ad4fdb6a25a70455 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 10 May 2021 16:22:11 -0700 Subject: [PATCH] Updated Upstream (CraftBukkit) (#5607) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: e1a6197e SPIGOT-5565: Animals still spawn from chunk gen when spawn-animals=false --- .../Duplicate-UUID-Resolve-Option.patch | 19 +++++++++++++------ work/CraftBukkit | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/Duplicate-UUID-Resolve-Option.patch index e40622e94..935a07d80 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 d28f36c68..e1a6197ec 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit d28f36c68405c1815857139e613a1098f4168029 +Subproject commit e1a6197ecb02b30fef3263d5802610f176eae2d6