mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
92c33ca0c7
commit
58a0878879
@ -0,0 +1,15 @@
|
||||
--- 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);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/effect/OozingMobEffect.java
|
||||
+++ b/net/minecraft/world/effect/OozingMobEffect.java
|
||||
@@ -51,7 +51,7 @@
|
||||
if (entityslime != null) {
|
||||
entityslime.setSize(2, true);
|
||||
entityslime.moveTo(d0, d1, d2, world.getRandom().nextFloat() * 360.0F, 0.0F);
|
||||
- world.addFreshEntity(entityslime);
|
||||
+ world.addFreshEntity(entityslime, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user