From 50e727d5912f3aa13225b4cf64fdb00a476cc89e Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Wed, 4 Nov 2015 15:35:22 -0500 Subject: [PATCH] Fix salvaging to return more than 1 item. Fixes #2627 --- .../java/com/gmail/nossr50/skills/salvage/SalvageManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java index ecd2f7e0e..409e15d73 100644 --- a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java +++ b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java @@ -91,7 +91,7 @@ public class SalvageManager extends SkillManager { return; } - salvageableAmount = Math.max((int) (salvageableAmount * getMaxSalvagePercentage()), 1); // Always get at least something back, if you're capable of salvaging it. + salvageableAmount = Math.min((int) (salvageableAmount * getMaxSalvagePercentage()), 1); // Always get at least something back, if you're capable of salvaging it. player.setItemInHand(new ItemStack(Material.AIR)); location.add(0, 1, 0);