2025-03-26 03:05:00 +11:00

23 lines
782 B
Diff

--- a/net/minecraft/world/item/MobBucketItem.java
+++ b/net/minecraft/world/item/MobBucketItem.java
@@ -18,6 +18,10 @@
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.level.material.FluidType;
+// CraftBukkit start
+import org.bukkit.event.entity.CreatureSpawnEvent;
+// CraftBukkit end
+
public class MobBucketItem extends ItemBucket {
private final EntityTypes<? extends EntityInsentient> type;
@@ -54,7 +58,7 @@
}
if (entityinsentient != null) {
- worldserver.addFreshEntityWithPassengers(entityinsentient);
+ worldserver.addFreshEntityWithPassengers(entityinsentient, CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
entityinsentient.playAmbientSound();
}