2024-07-16 11:53:08 +02:00
|
|
|
--- a/net/minecraft/world/effect/InfestedMobEffect.java
|
|
|
|
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
|
2024-10-22 17:15:00 +02:00
|
|
|
@@ -48,7 +48,11 @@
|
2024-07-16 11:53:08 +02:00
|
|
|
|
2024-10-22 17:15:00 +02:00
|
|
|
entitysilverfish.moveTo(d0, d1, d2, worldserver.getRandom().nextFloat() * 360.0F, 0.0F);
|
2024-07-16 11:53:08 +02:00
|
|
|
entitysilverfish.setDeltaMovement(new Vec3D(vector3f));
|
2024-10-22 17:15:00 +02:00
|
|
|
- worldserver.addFreshEntity(entitysilverfish);
|
2024-07-16 11:53:08 +02:00
|
|
|
+ // CraftBukkit start
|
2024-10-22 17:15:00 +02:00
|
|
|
+ if (!worldserver.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
|
2024-07-16 11:53:08 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
entitysilverfish.playSound(SoundEffects.SILVERFISH_HURT);
|
|
|
|
}
|
|
|
|
}
|