diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Witch.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Witch.java.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Witch.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Witch.java.patch new file mode 100644 index 0000000000..e518e8dd84 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Witch.java.patch @@ -0,0 +1,24 @@ +--- a/net/minecraft/world/entity/monster/Witch.java ++++ b/net/minecraft/world/entity/monster/Witch.java +@@ -123,11 +125,16 @@ + this.setUsingItem(false); + ItemStack mainHandItem = this.getMainHandItem(); + this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); +- if (mainHandItem.is(Items.POTION)) { +- List<MobEffectInstance> mobEffects = PotionUtils.getMobEffects(mainHandItem); +- if (mobEffects != null) { +- for (MobEffectInstance mobEffectInstance : mobEffects) { +- this.addEffect(new MobEffectInstance(mobEffectInstance)); ++ if (itemstack.is(Items.POTION)) { ++ List<MobEffectInstance> list = PotionUtils.getMobEffects(itemstack); ++ ++ if (list != null) { ++ Iterator iterator = list.iterator(); ++ ++ while (iterator.hasNext()) { ++ MobEffectInstance mobeffect = (MobEffectInstance) iterator.next(); ++ ++ this.addEffect(new MobEffectInstance(mobeffect), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit + } + } + } |