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
This commit is contained in:
Jake Potrebic 2021-05-10 16:22:11 -07:00
parent e3e1468b4b
commit 0248c23203
2 changed files with 14 additions and 7 deletions

View File

@ -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))) {

@ -1 +1 @@
Subproject commit d28f36c68405c1815857139e613a1098f4168029
Subproject commit e1a6197ecb02b30fef3263d5802610f176eae2d6