mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
9da047989c
By: md_5 <git@md-5.net>
16 lines
630 B
Diff
16 lines
630 B
Diff
--- a/net/minecraft/world/level/WorldAccess.java
|
|
+++ b/net/minecraft/world/level/WorldAccess.java
|
|
@@ -8,6 +8,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
|
|
}
|