mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 10:44:39 +01:00
30e4583dbe
By: Initial Source <noreply+automated@papermc.io>
15 lines
671 B
Diff
15 lines
671 B
Diff
--- a/net/minecraft/world/effect/InfestedMobEffect.java
|
|
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
|
|
@@ -48,7 +48,11 @@
|
|
|
|
entitysilverfish.moveTo(x, y, z, world.getRandom().nextFloat() * 360.0F, 0.0F);
|
|
entitysilverfish.setDeltaMovement(new Vec3(vector3f));
|
|
- world.addFreshEntity(entitysilverfish);
|
|
+ // CraftBukkit start
|
|
+ if (!world.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
entitysilverfish.playSound(SoundEvents.SILVERFISH_HURT);
|
|
}
|
|
}
|