0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-25 04:36:13 +00:00
craftbukkit/nms-patches/net/minecraft/world/item/ItemMonsterEgg.patch
2024-10-23 02:15:00 +11:00

16 lines
920 B
Diff

--- a/net/minecraft/world/item/ItemMonsterEgg.java
+++ b/net/minecraft/world/item/ItemMonsterEgg.java
@@ -176,10 +176,10 @@
return Optional.empty();
} else {
((EntityInsentient) object).moveTo(vec3d.x(), vec3d.y(), vec3d.z(), 0.0F, 0.0F);
- worldserver.addFreshEntityWithPassengers((Entity) object);
+ worldserver.addFreshEntityWithPassengers((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
((EntityInsentient) object).setCustomName((IChatBaseComponent) itemstack.get(DataComponents.CUSTOM_NAME));
itemstack.consume(1, entityhuman);
- return Optional.of(object);
+ return Optional.of((EntityInsentient) object); // CraftBukkit - decompile error
}
}
}