diff --git a/src/main/java/mekanism/common/recipe/RecipeHandler.java b/src/main/java/mekanism/common/recipe/RecipeHandler.java index 67ff6a009..8f5a8d9f0 100644 --- a/src/main/java/mekanism/common/recipe/RecipeHandler.java +++ b/src/main/java/mekanism/common/recipe/RecipeHandler.java @@ -287,6 +287,12 @@ public final class RecipeHandler HashMap recipes = Recipe.METALLURGIC_INFUSER.get(); MetallurgicInfuserRecipe recipe = recipes.get(input); + + if(recipe == null) + { + recipe = recipes.get(input.wildCopy()); + } + return recipe == null ? null : recipe.copy(); } @@ -427,6 +433,12 @@ public final class RecipeHandler if(input.isValid()) { RECIPE recipe = recipes.get(input); + + if(recipe == null) + { + recipe = recipes.get(input.wildCopy()); + } + return recipe == null ? null : recipe.copy(); } @@ -484,6 +496,12 @@ public final class RecipeHandler HashMap recipes = Recipe.PRESSURIZED_REACTION_CHAMBER.get(); PressurizedRecipe recipe = recipes.get(input); + + if(recipe == null) + { + recipe = recipes.get(input.wildCopy()); + } + return recipe == null ? null : recipe.copy(); } diff --git a/src/main/java/mekanism/common/recipe/inputs/AdvancedMachineInput.java b/src/main/java/mekanism/common/recipe/inputs/AdvancedMachineInput.java index f43e3e2a3..7a3977a74 100644 --- a/src/main/java/mekanism/common/recipe/inputs/AdvancedMachineInput.java +++ b/src/main/java/mekanism/common/recipe/inputs/AdvancedMachineInput.java @@ -7,6 +7,7 @@ import mekanism.common.util.StackUtils; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.NonNullList; +import net.minecraftforge.oredict.OreDictionary; public class AdvancedMachineInput extends MachineInput { @@ -94,4 +95,9 @@ public class AdvancedMachineInput extends MachineInput { return other instanceof AdvancedMachineInput; } + + public AdvancedMachineInput wildCopy() + { + return new AdvancedMachineInput(new ItemStack(itemStack.getItem(), itemStack.getCount(), OreDictionary.WILDCARD_VALUE), gasType); + } } diff --git a/src/main/java/mekanism/common/recipe/inputs/InfusionInput.java b/src/main/java/mekanism/common/recipe/inputs/InfusionInput.java index 41919c75d..4e97f9771 100644 --- a/src/main/java/mekanism/common/recipe/inputs/InfusionInput.java +++ b/src/main/java/mekanism/common/recipe/inputs/InfusionInput.java @@ -8,6 +8,7 @@ import mekanism.common.util.StackUtils; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.NonNullList; +import net.minecraftforge.oredict.OreDictionary; /** * An infusion input, containing the type of and amount of infuse the operation requires, as well as the input ItemStack. @@ -94,4 +95,9 @@ public class InfusionInput extends MachineInput { return other instanceof InfusionInput; } + + public InfusionInput wildCopy() + { + return new InfusionInput(infuse, new ItemStack(inputStack.getItem(), inputStack.getCount(), OreDictionary.WILDCARD_VALUE)); + } } diff --git a/src/main/java/mekanism/common/recipe/inputs/PressurizedInput.java b/src/main/java/mekanism/common/recipe/inputs/PressurizedInput.java index 46eb15af7..9f019f5c6 100644 --- a/src/main/java/mekanism/common/recipe/inputs/PressurizedInput.java +++ b/src/main/java/mekanism/common/recipe/inputs/PressurizedInput.java @@ -9,6 +9,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.NonNullList; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; +import net.minecraftforge.oredict.OreDictionary; /** * An input of a gas, a fluid and an item for the pressurized reaction chamber @@ -165,4 +166,9 @@ public class PressurizedInput extends MachineInput { return other instanceof PressurizedInput; } + + public PressurizedInput wildCopy() + { + return new PressurizedInput(new ItemStack(theSolid.getItem(), theSolid.getCount(), OreDictionary.WILDCARD_VALUE), theFluid, theGas); + } }