small optimization to crafting tree
This commit is contained in:
@@ -544,22 +544,6 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
|
||||
if( res == null )
|
||||
{
|
||||
if( details != null && details.isCraftable() )
|
||||
{
|
||||
for( final IAEItemStack ais : this.craftableItems.keySet() )
|
||||
{
|
||||
if( ais.getItem() == whatToCraft.getItem() && ( !ais.getItem().getHasSubtypes() || ais.getItemDamage() == whatToCraft.getItemDamage() ) )
|
||||
{
|
||||
// TODO: check if OK
|
||||
// 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user