Fixed a bug where Salvage was giving back too many materials

This commit is contained in:
nossr50 2019-02-01 10:22:55 -08:00
parent 90520cd50b
commit c6a4cbd715
3 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,9 @@ Key:
! Change
- Removal
Version 2.1.6
Fixed a bug where Salvage was giving back too many resources
Version 2.1.5
mcMMO no longer ignores cancelled events relating to the player left or right clicking

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.5</version>
<version>2.1.6-SNAPSHOT</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

View File

@ -103,8 +103,8 @@ public class SalvageManager extends SkillManager {
return;
}
//Amount of materials to salvage based on rank
salvageableAmount = getSalvageableAmount();
salvageableAmount = Math.min(salvageableAmount, getSalvageableAmount()); // 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);