From 986f4cf4c655ec7c2a70a66761a59b87cf2246da Mon Sep 17 00:00:00 2001 From: Devon Palma Date: Fri, 3 Aug 2018 15:44:54 -0600 Subject: [PATCH] - removed check for BlockData repairData, to fix issue with latest CraftBukkit commit (see issue https://github.com/mcMMO-Dev/mcMMO/issues/3532 ) - changed material name from OAK_WOOD to OAK_PLANKS --- .../com/gmail/nossr50/datatypes/skills/MaterialType.java | 2 +- src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/MaterialType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/MaterialType.java index 8458c43fb..62f7ed160 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/MaterialType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/MaterialType.java @@ -21,7 +21,7 @@ public enum MaterialType { return Material.LEATHER; case WOOD: - return Material.OAK_WOOD; + return Material.OAK_PLANKS; case STONE: return Material.COBBLESTONE; diff --git a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java index 7954ed569..c396f00b8 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java @@ -278,7 +278,6 @@ public class SkillUtils { item.setDurability((short) 0); int quantity = 0; - BlockData repairData = repairMaterial != null ? repairMaterial.createBlockData() : null; List recipes = mcMMO.p.getServer().getRecipesFor(item); if (recipes.isEmpty()) { @@ -289,14 +288,14 @@ public class SkillUtils { if (recipe instanceof ShapelessRecipe) { for (ItemStack ingredient : ((ShapelessRecipe) recipe).getIngredientList()) { - if (ingredient != null && (repairMaterial == null || ingredient.getType() == repairMaterial) && (repairMetadata == -1 || ingredient.getType().equals(repairData))) { + if (ingredient != null && (repairMaterial == null || ingredient.getType() == repairMaterial)) { quantity += ingredient.getAmount(); } } } else if (recipe instanceof ShapedRecipe) { for (ItemStack ingredient : ((ShapedRecipe) recipe).getIngredientMap().values()) { - if (ingredient != null && (repairMaterial == null || ingredient.getType() == repairMaterial) && (repairMetadata == -1 || ingredient.getType().equals(repairData))) { + if (ingredient != null && (repairMaterial == null || ingredient.getType() == repairMaterial)) { quantity += ingredient.getAmount(); } }