diff --git a/patches/server/Expand-PlayerItemMendEvent.patch b/patches/server/Expand-PlayerItemMendEvent.patch index f3afab364d..ceb80423e7 100644 --- a/patches/server/Expand-PlayerItemMendEvent.patch +++ b/patches/server/Expand-PlayerItemMendEvent.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start - org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k); + // Paper start - mending event -+ final int consumedExperience = k * amount / j; ++ final int consumedExperience = k > 0 ? k * amount / j : 0; + org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k, consumedExperience); + // Paper end - mending event k = event.getRepairAmount();