Also use the player's inventory to handle NEI fills

If the items for a recipe are not available in the ME network when you
shift-left-click the NEI question mark, also try to pull from the
player's inventory.

The 'ic' local variable was renamed to 'testInv', as it's used to test
the IRecipe on various crafting propositions to see if the item
satisfies the recipe.

Closes #564, "Shift clicking "?" on NEI recipe ignores items in the
player's inventory".
This commit is contained in:
riking
2014-12-10 11:05:01 -08:00
parent 1fc2ddedec
commit 60569ac221
3 changed files with 42 additions and 9 deletions
@@ -90,6 +90,10 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
@Override
public IInventory getInventoryByName(String name)
{
if (name.equals("player"))
{
return invPlayer;
}
return ct.getInventoryByName( name );
}
@@ -447,6 +447,10 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
@Override
public IInventory getInventoryByName(String name)
{
if (name.equals("player"))
{
return invPlayer;
}
return ct.getInventoryByName( name );
}