mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
16 lines
835 B
Diff
16 lines
835 B
Diff
|
--- a/net/minecraft/world/item/SpawnEggItem.java
|
||
|
+++ b/net/minecraft/world/item/SpawnEggItem.java
|
||
|
@@ -176,10 +176,10 @@
|
||
|
return Optional.empty();
|
||
|
} else {
|
||
|
((Mob) object).moveTo(pos.x(), pos.y(), pos.z(), 0.0F, 0.0F);
|
||
|
- world.addFreshEntityWithPassengers((Entity) object);
|
||
|
+ world.addFreshEntityWithPassengers((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
|
||
|
((Mob) object).setCustomName((Component) stack.get(DataComponents.CUSTOM_NAME));
|
||
|
stack.consume(1, user);
|
||
|
- return Optional.of(object);
|
||
|
+ return Optional.of((Mob) object); // CraftBukkit - decompile error
|
||
|
}
|
||
|
}
|
||
|
}
|