blob: 46d84cb1c300190820f86be238e072e39e19d0c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- 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
}
|