13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/world/effect/InfestedMobEffect.patch
CraftBukkit/Spigot 58a0878879 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
By: Doc <nachito94@msn.com>
2024-07-16 19:53:08 +10:00

16 Zeilen
676 B
Diff

--- a/net/minecraft/world/effect/InfestedMobEffect.java
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
@@ -47,7 +47,11 @@
entitysilverfish.moveTo(d0, d1, d2, world.getRandom().nextFloat() * 360.0F, 0.0F);
entitysilverfish.setDeltaMovement(new Vec3D(vector3f));
- world.addFreshEntity(entitysilverfish);
+ // CraftBukkit start
+ if (!world.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
+ return;
+ }
+ // CraftBukkit end
entitysilverfish.playSound(SoundEffects.SILVERFISH_HURT);
}
}