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
+2 -1
View File
@@ -489,7 +489,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
if( ais.getItem() == whatToCraft.getItem() && ( !ais.getItem().getHasSubtypes() || ais.getItemDamage() == whatToCraft.getItemDamage() ) )
{
// TODO: check if OK
if( details.isValidItemForSlot( slotIndex, ais.createItemStack(), world ) )
// TODO: this is slightly hacky, but fine as long as we only deal with itemstacks
if( details.isValidItemForSlot( slotIndex, ais.asItemStackRepresentation(), world ) )
{
return this.craftableItems.get( ais );
}