mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 05:46:13 +00:00
22 lines
782 B
Diff
22 lines
782 B
Diff
--- a/net/minecraft/world/level/WorldAccess.java
|
|
+++ b/net/minecraft/world/level/WorldAccess.java
|
|
@@ -8,6 +8,17 @@
|
|
WorldServer getLevel();
|
|
|
|
default void addFreshEntityWithPassengers(Entity entity) {
|
|
- entity.getSelfAndPassengers().forEach(this::addFreshEntity);
|
|
+ // CraftBukkit start
|
|
+ this.addFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
|
|
+ }
|
|
+
|
|
+ default void addFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
|
+ entity.getSelfAndPassengers().forEach((e) -> this.addFreshEntity(e, reason));
|
|
}
|
|
+
|
|
+ @Override
|
|
+ default WorldServer getMinecraftWorld() {
|
|
+ return getLevel();
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|