mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
23 lines
852 B
Diff
23 lines
852 B
Diff
![]() |
--- a/net/minecraft/world/item/MobBucketItem.java
|
||
|
+++ b/net/minecraft/world/item/MobBucketItem.java
|
||
|
@@ -26,6 +26,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 static final MapCodec<EntityTropicalFish.d> VARIANT_FIELD_CODEC = EntityTropicalFish.d.CODEC.fieldOf("BucketVariantTag");
|
||
|
@@ -63,7 +67,7 @@
|
||
|
}
|
||
|
|
||
|
if (entityinsentient != null) {
|
||
|
- worldserver.addFreshEntityWithPassengers(entityinsentient);
|
||
|
+ worldserver.addFreshEntityWithPassengers(entityinsentient, CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
|
||
|
entityinsentient.playAmbientSound();
|
||
|
}
|
||
|
|