|
@@ -84,36 +84,8 @@ public class Repair {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static int getRepairAndSalvageQuantities(ItemStack inHand) {
|
|
|
- // Temporary workaround until they get their stuff fixed.
|
|
|
- if (mcMMO.isMCPCEnabled()) {
|
|
|
- if (ItemUtils.isPickaxe(inHand) || ItemUtils.isAxe(inHand) || ItemUtils.isBow(inHand) || inHand.getType() == Material.BUCKET) {
|
|
|
- return 3;
|
|
|
- }
|
|
|
- else if (ItemUtils.isShovel(inHand) || inHand.getType() == Material.FLINT_AND_STEEL) {
|
|
|
- return 1;
|
|
|
- }
|
|
|
- else if (ItemUtils.isSword(inHand) || ItemUtils.isHoe(inHand) || inHand.getType() == Material.CARROT_STICK || inHand.getType() == Material.FISHING_ROD || inHand.getType() == Material.SHEARS) {
|
|
|
- return 2;
|
|
|
- }
|
|
|
- else if (ItemUtils.isHelmet(inHand)) {
|
|
|
- return 5;
|
|
|
- }
|
|
|
- else if (ItemUtils.isChestplate(inHand)) {
|
|
|
- return 8;
|
|
|
- }
|
|
|
- else if (ItemUtils.isLeggings(inHand)) {
|
|
|
- return 7;
|
|
|
- }
|
|
|
- else if (ItemUtils.isBoots(inHand)) {
|
|
|
- return 4;
|
|
|
- }
|
|
|
- else {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return getRepairAndSalvageQuantities(inHand, getRepairAndSalvageItem(inHand), (byte) -1);
|
|
|
+ public static int getRepairAndSalvageQuantities(ItemStack item) {
|
|
|
+ return getRepairAndSalvageQuantities(item, getRepairAndSalvageItem(item), (byte) -1);
|
|
|
}
|
|
|
|
|
|
public static int getRepairAndSalvageQuantities(ItemStack item, Material repairMaterial, byte repairMetadata) {
|