diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch new file mode 100644 index 0000000000..6c7f584823 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/entity/projectile/Arrow.java ++++ b/net/minecraft/world/entity/projectile/Arrow.java +@@ -177,22 +207,21 @@ + super.doPostHurtEffects(living); + Entity effectSource = this.getEffectSource(); + +- for (MobEffectInstance mobEffectInstance : this.potion.getEffects()) { +- living.addEffect( +- new MobEffectInstance( +- mobEffectInstance.getEffect(), +- Math.max(mobEffectInstance.mapDuration(i -> i / 8), 1), +- mobEffectInstance.getAmplifier(), +- mobEffectInstance.isAmbient(), +- mobEffectInstance.isVisible() +- ), +- effectSource +- ); ++ MobEffectInstance mobeffect; ++ ++ while (iterator.hasNext()) { ++ mobeffect = (MobEffectInstance) iterator.next(); ++ living.addEffect(new MobEffectInstance(mobeffect.getEffect(), Math.max(mobeffect.mapDuration((i) -> { ++ return i / 8; ++ }), 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible()), entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit + } + + if (!this.effects.isEmpty()) { +- for (MobEffectInstance mobEffectInstance : this.effects) { +- living.addEffect(mobEffectInstance, effectSource); ++ iterator = this.effects.iterator(); ++ ++ while (iterator.hasNext()) { ++ mobeffect = (MobEffectInstance) iterator.next(); ++ living.addEffect(mobeffect, entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit + } + } + } |