PaperMC/paper-server/nms-patches/WorldAccess.patch

16 lines
594 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.cp().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.cp().forEach((e) -> this.addEntity(e, reason));
+ }
+ // CraftBukkit end
}