Fixes #3315: Slightly more permissive checks for autocrafting (#3319)

* Fixes #3315: Slightly more permissive checks for autocrafting

Also fixes a bug in the fallback for looking up patterns to only use
ItemStack.EMPTY.
This commit is contained in:
yueh
2018-01-14 13:43:31 +01:00
committed by GitHub
parent 483049f555
commit 8c5842aca9
2 changed files with 17 additions and 1 deletions
@@ -180,10 +180,25 @@ public class ItemComparisonHelper
{
return true;
}
final boolean isLeftEmpty = left == null || left.hasNoTags();
final boolean isRightEmpty = right == null || right.hasNoTags();
if( isLeftEmpty && isRightEmpty )
{
return true;
}
if( isLeftEmpty != isRightEmpty )
{
return false;
}
if( left != null )
{
return left.equals( right );
}
return false;
}
}