PaperMC/paper-server/nms-patches/WorldAccess.patch
CraftBukkit/Spigot 78ff16111e Update to Minecraft 1.16.5
By: md_5 <git@md-5.net>
2021-01-16 12:00:00 +11:00

16 lines
620 B
Diff

--- a/net/minecraft/server/WorldAccess.java
+++ b/net/minecraft/server/WorldAccess.java
@@ -5,6 +5,12 @@
WorldServer getMinecraftWorld();
default void addAllEntities(Entity entity) {
- entity.recursiveStream().forEach(this::addEntity);
+ // CraftBukkit start
+ this.addAllEntities(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
}
+
+ default void addAllEntities(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
+ entity.recursiveStream().forEach((e) -> this.addEntity(e, reason));
+ }
+ // CraftBukkit end
}