PaperMC/paper-server/nms-patches/net/minecraft/world/level/WorldAccess.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

21 lines
720 B
Diff

--- a/net/minecraft/world/level/WorldAccess.java
+++ b/net/minecraft/world/level/WorldAccess.java
@@ -8,6 +8,17 @@
WorldServer getLevel();
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));
+ }
+
+ @Override
+ default WorldServer getMinecraftWorld() {
+ return getLevel();
+ }
+ // CraftBukkit end
}