mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
a265d64138
By: Initial <noreply+automated@papermc.io>
15 lines
694 B
Diff
15 lines
694 B
Diff
--- a/net/minecraft/world/effect/InfestedMobEffect.java
|
|
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
|
|
@@ -48,7 +48,11 @@
|
|
|
|
entitysilverfish.moveTo(d0, d1, d2, worldserver.getRandom().nextFloat() * 360.0F, 0.0F);
|
|
entitysilverfish.setDeltaMovement(new Vec3D(vector3f));
|
|
- worldserver.addFreshEntity(entitysilverfish);
|
|
+ // CraftBukkit start
|
|
+ if (!worldserver.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
entitysilverfish.playSound(SoundEffects.SILVERFISH_HURT);
|
|
}
|
|
}
|