diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch index 14e7128bd1..9c695872d5 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch @@ -1,7 +1,15 @@ --- a/net/minecraft/world/entity/monster/Witch.java +++ b/net/minecraft/world/entity/monster/Witch.java -@@ -126,7 +126,7 @@ +@@ -124,9 +124,15 @@ + + this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS); ++ // Paper start - WitchConsumePotionEvent ++ if (itemstack.is(Items.POTION)) { ++ com.destroystokyo.paper.event.entity.WitchConsumePotionEvent event = new com.destroystokyo.paper.event.entity.WitchConsumePotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); ++ potioncontents = event.callEvent() ? org.bukkit.craftbukkit.inventory.CraftItemStack.unwrap(event.getPotion()).get(DataComponents.POTION_CONTENTS) : null; ++ } ++ // Paper end - WitchConsumePotionEvent if (itemstack.is(Items.POTION) && potioncontents != null) { - potioncontents.forEachEffect(this::addEffect);