This commit is contained in:
kn-km 2020-07-27 22:55:44 +08:00 committed by GitHub
parent a28d1cd537
commit 5d294d6dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,6 @@ public class SalvageManager extends SkillManager {
potentialSalvageYield = Math.min(potentialSalvageYield, getSalvageLimit()); // Always get at least something back, if you're capable of salvaging it. potentialSalvageYield = Math.min(potentialSalvageYield, getSalvageLimit()); // Always get at least something back, if you're capable of salvaging it.
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
location.add(0.5, 1, 0.5); location.add(0.5, 1, 0.5);
Map<Enchantment, Integer> enchants = item.getEnchantments(); Map<Enchantment, Integer> enchants = item.getEnchantments();
@ -140,6 +139,8 @@ public class SalvageManager extends SkillManager {
return; return;
} }
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
Location anvilLoc = location.clone(); Location anvilLoc = location.clone();
Location playerLoc = player.getLocation().clone(); Location playerLoc = player.getLocation().clone();
double distance = anvilLoc.distance(playerLoc); double distance = anvilLoc.distance(playerLoc);