2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/WorldAccess.java
|
|
|
|
+++ b/net/minecraft/world/level/WorldAccess.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -8,6 +8,17 @@
|
|
|
|
WorldServer getLevel();
|
2020-08-11 23:00:00 +02:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
default void addFreshEntityWithPassengers(Entity entity) {
|
|
|
|
- entity.getSelfAndPassengers().forEach(this::addFreshEntity);
|
2020-08-11 23:00:00 +02:00
|
|
|
+ // CraftBukkit start
|
2021-11-21 23:00:00 +01:00
|
|
|
+ this.addFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
|
2023-09-21 18:57:13 +02:00
|
|
|
+ }
|
2020-08-11 23:00:00 +02:00
|
|
|
+
|
2021-11-21 23:00:00 +01:00
|
|
|
+ default void addFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
|
|
|
+ entity.getSelfAndPassengers().forEach((e) -> this.addFreshEntity(e, reason));
|
2023-09-21 18:57:13 +02:00
|
|
|
}
|
2021-06-11 07:00:00 +02:00
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ default WorldServer getMinecraftWorld() {
|
|
|
|
+ return getLevel();
|
|
|
|
+ }
|
2020-08-11 23:00:00 +02:00
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|