mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 02:07:37 +01:00
43702a9e10
By: md_5 <git@md-5.net>
21 lines
1001 B
Diff
21 lines
1001 B
Diff
--- a/net/minecraft/world/item/ItemMonsterEgg.java
|
|
+++ b/net/minecraft/world/item/ItemMonsterEgg.java
|
|
@@ -179,7 +179,7 @@
|
|
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
|
|
if (itemstack.hasCustomHoverName()) {
|
|
((EntityInsentient) object).setCustomName(itemstack.getHoverName());
|
|
}
|
|
@@ -188,7 +188,7 @@
|
|
itemstack.shrink(1);
|
|
}
|
|
|
|
- return Optional.of(object);
|
|
+ return Optional.of((EntityInsentient) object); // CraftBukkit - decompile error
|
|
}
|
|
}
|
|
}
|