SPIGOT-6186: Canceling a CreatureSpawnEvent results in a "Unable to summon entity due to duplicate UUIDs" error
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/WorldAccess.java
|
||||
+++ b/net/minecraft/server/WorldAccess.java
|
||||
@@ -5,6 +5,13 @@
|
||||
@@ -5,6 +5,12 @@
|
||||
WorldServer getMinecraftWorld();
|
||||
|
||||
default void addAllEntities(Entity entity) {
|
||||
@@ -9,9 +9,8 @@
|
||||
+ this.addAllEntities(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
|
||||
}
|
||||
+
|
||||
+ default boolean addAllEntities(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
||||
+ default void addAllEntities(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
||||
+ entity.cp().forEach((e) -> this.addEntity(e, reason));
|
||||
+ return !entity.dead;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user