mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
15 lines
920 B
Diff
15 lines
920 B
Diff
--- a/net/minecraft/world/item/ItemMonsterEgg.java
|
|
+++ b/net/minecraft/world/item/ItemMonsterEgg.java
|
|
@@ -177,10 +177,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
|
|
}
|
|
}
|
|
}
|