Permalink
Browse files

Improved warning output for when an invalid recipe is found.

  • Loading branch information...
me4502 committed Feb 25, 2017
1 parent 3db7631 commit e13b11996d0c742fa8b164b5209b2a98a4957dc2
@@ -99,7 +99,8 @@ public boolean craft(InventoryHolder disp) {
if(!ItemUtil.isStackValid(result)) {
if (!hasWarnedNoResult) {
- CraftBookPlugin.inst().getLogger().warning("An Automatic Crafter IC had a valid recipe, but there was no result! This means Bukkit has an invalid recipe!");
+ CraftBookPlugin.inst().getLogger().warning("An Automatic Crafter IC had a valid recipe, but there was no result! This means Bukkit"
+ + " has an invalid recipe! Result: " + result);
hasWarnedNoResult = true;
}
return false;
@@ -374,7 +374,6 @@ public static boolean areBaseItemsIdentical(ItemStack item, ItemStack item2) {
}
public static boolean isStackValid(ItemStack item) {
-
return item != null && item.getAmount() > 0 && item.getTypeId() > 0 && (getMaxDurability(item.getType()) == 0 || item.getDurability() < getMaxDurability(item.getType()));
}

0 comments on commit e13b119

Please sign in to comment.