Kaynağa Gözat

Fixed bug with using Salvage on stacked items. Stacked items will now
return the appropriate amount of materials. Fixes #802

GJ 12 yıl önce
ebeveyn
işleme
9377de930f

+ 1 - 0
Changelog.txt

@@ -12,6 +12,7 @@ Version 1.4.03-dev
  = Fixed bug where players were unable to salvage leather armor
  = Fixed bug with repairing using materials with byte metadata
  = Fixed bug where Fishing was becoming less successful at higher levels
+ = Fixed bug with using Salvage on stacked items.
  ! Moved the Salvage unlock level from config.yml to advanced.yml
  - Removed option to disable Salvage via the config file. This should be handled via permissions instead.
  - Removed the option to use Woodcutting without an axe from the config file.

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java

@@ -188,7 +188,7 @@ public class RepairManager extends SkillManager {
             player.setItemInHand(new ItemStack(Material.AIR));
             location.setY(location.getY() + 1);
 
-            Misc.dropItems(location, new ItemStack(Repair.getSalvagedItem(item)), Repair.getSalvagedAmount(item));
+            Misc.dropItems(location, new ItemStack(Repair.getSalvagedItem(item)), Repair.getSalvagedAmount(item) * item.getAmount());
 
             player.playSound(player.getLocation(), Sound.ANVIL_USE, Misc.ANVIL_USE_VOLUME, Misc.ANVIL_USE_PITCH);
             player.sendMessage(LocaleLoader.getString("Repair.Skills.SalvageSuccess"));