mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-27 11:07:44 +01:00
Moved salvaged material spawn center to center of top face of anvil.
My fix for the central spawn points of various block-based item drops moved them from the low corner of the block to the center of the block. In the case of the salvaged materials, this moved the central spawn point from the low corner of the top face of the anvil block to the center of the block above the anvil block. This felt unnatural, so the point has been moved to the center of the top face of the anvil block.
This commit is contained in:
parent
2d4cf76825
commit
60bfabb097
@ -460,7 +460,7 @@ public class PlayerListener implements Listener {
|
||||
// Make sure the player knows what he's doing when trying to salvage an enchanted item
|
||||
if (!(heldItem.getEnchantments().size() > 0) || salvageManager.checkConfirmation(true)) {
|
||||
SkillUtils.handleAbilitySpeedDecrease(player);
|
||||
salvageManager.handleSalvage(Misc.getBlockCenter(block.getState()), heldItem);
|
||||
salvageManager.handleSalvage(block.getLocation(), heldItem);
|
||||
player.updateInventory();
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class SalvageManager extends SkillManager {
|
||||
salvageableAmount = Math.max((int) (salvageableAmount * getMaxSalvagePercentage()), 1); // Always get at least something back, if you're capable of salvaging it.
|
||||
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.AIR));
|
||||
location.add(0, 1, 0);
|
||||
location.add(0.5, 1, 0.5);
|
||||
|
||||
Map<Enchantment, Integer> enchants = item.getEnchantments();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user