mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 08:36:45 +01:00
- 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
This commit is contained in:
parent
a39a77f89e
commit
986f4cf4c6
@ -21,7 +21,7 @@ public enum MaterialType {
|
|||||||
return Material.LEATHER;
|
return Material.LEATHER;
|
||||||
|
|
||||||
case WOOD:
|
case WOOD:
|
||||||
return Material.OAK_WOOD;
|
return Material.OAK_PLANKS;
|
||||||
|
|
||||||
case STONE:
|
case STONE:
|
||||||
return Material.COBBLESTONE;
|
return Material.COBBLESTONE;
|
||||||
|
@ -278,7 +278,6 @@ public class SkillUtils {
|
|||||||
item.setDurability((short) 0);
|
item.setDurability((short) 0);
|
||||||
|
|
||||||
int quantity = 0;
|
int quantity = 0;
|
||||||
BlockData repairData = repairMaterial != null ? repairMaterial.createBlockData() : null;
|
|
||||||
List<Recipe> recipes = mcMMO.p.getServer().getRecipesFor(item);
|
List<Recipe> recipes = mcMMO.p.getServer().getRecipesFor(item);
|
||||||
|
|
||||||
if (recipes.isEmpty()) {
|
if (recipes.isEmpty()) {
|
||||||
@ -289,14 +288,14 @@ public class SkillUtils {
|
|||||||
|
|
||||||
if (recipe instanceof ShapelessRecipe) {
|
if (recipe instanceof ShapelessRecipe) {
|
||||||
for (ItemStack ingredient : ((ShapelessRecipe) recipe).getIngredientList()) {
|
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();
|
quantity += ingredient.getAmount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (recipe instanceof ShapedRecipe) {
|
else if (recipe instanceof ShapedRecipe) {
|
||||||
for (ItemStack ingredient : ((ShapedRecipe) recipe).getIngredientMap().values()) {
|
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();
|
quantity += ingredient.getAmount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user