diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/projectile/Arrow.java.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
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 + } + } + } |