Fix up recipe system to accept wildcard blocks

This commit is contained in:
Aidan Brady 2013-12-02 22:42:54 -05:00
parent a3fa18cb80
commit 47fd7799ff
2 changed files with 4 additions and 4 deletions

View file

@ -104,7 +104,7 @@ public class MekanismRecipe implements IRecipe
}
else if(in instanceof Block)
{
itemMap.put(chr, new ItemStack((Block)in));
itemMap.put(chr, new ItemStack((Block)in, 1, OreDictionary.WILDCARD_VALUE));
}
else if(in instanceof String)
{
@ -289,7 +289,7 @@ public class MekanismRecipe implements IRecipe
if(!(target.getItem() instanceof IEnergizedItem) && !(input.getItem() instanceof IEnergizedItem))
{
if(target.getItemDamage() != input.getItemDamage())
if(target.getItemDamage() != input.getItemDamage() && target.getItemDamage() != OreDictionary.WILDCARD_VALUE)
{
return false;
}
@ -297,7 +297,7 @@ public class MekanismRecipe implements IRecipe
else {
if(((IEnergizedItem)target.getItem()).isMetadataSpecific() && ((IEnergizedItem)input.getItem()).isMetadataSpecific())
{
if(target.getItemDamage() != input.getItemDamage())
if(target.getItemDamage() != input.getItemDamage() && target.getItemDamage() != OreDictionary.WILDCARD_VALUE)
{
return false;
}

View file

@ -114,7 +114,7 @@ public class MekanismGenerators implements IModule
public void addRecipes()
{
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Generator, 1, 0), new Object[] {
"III", "COC", "IFI", Character.valueOf('I'), "ingotIron", Character.valueOf('C'), "ingotCopper", Character.valueOf('O'), "ingotOsmium", Character.valueOf('F'), Block.furnaceIdle
"III", "WOW", "CFC", Character.valueOf('I'), "ingotIron", Character.valueOf('C'), "ingotCopper", Character.valueOf('O'), "ingotOsmium", Character.valueOf('F'), Block.furnaceIdle, Character.valueOf('W'), Block.planks
}));
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Generator, 1, 1), new Object[] {
"SSS", "AIA", "PEP", Character.valueOf('S'), SolarPanel, Character.valueOf('A'), Mekanism.EnrichedAlloy, Character.valueOf('I'), Item.ingotIron, Character.valueOf('P'), "dustOsmium", Character.valueOf('E'), Mekanism.EnergyTablet.getUnchargedItem()