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/monster/Witch.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/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 + } + } + } |