Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-23 14:50:08 +01:00
18 Zeilen
627 B
Diff
18 Zeilen
627 B
Diff
|
--- a/net/minecraft/server/WorldAccess.java
|
||
|
+++ b/net/minecraft/server/WorldAccess.java
|
||
|
@@ -5,6 +5,13 @@
|
||
|
WorldServer getMinecraftWorld();
|
||
|
|
||
|
default void addAllEntities(Entity entity) {
|
||
|
- entity.co().forEach(this::addEntity);
|
||
|
+ // CraftBukkit start
|
||
|
+ this.addAllEntities(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
|
||
|
}
|
||
|
+
|
||
|
+ default boolean addAllEntities(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
||
|
+ entity.co().forEach((e) -> this.addEntity(e, reason));
|
||
|
+ return !entity.dead;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
}
|