Start work on recipe systems

This commit is contained in:
Aidan C. Brady 2014-01-26 17:55:49 -05:00
parent b180f4e968
commit b0fbaba62b
8 changed files with 121 additions and 4 deletions

View file

@ -159,9 +159,9 @@ public final class RecipeHelper
}
/**
* Add a Electrolytic Separator recipe.
* @param input - input ItemStack
* @param output - output ItemStack
* Add an Electrolytic Separator recipe.
* @param input - input FluidStack
* @param output - output ChemicalPair
*/
public static void addElectrolyticSeparatorRecipe(FluidStack input, ChemicalPair output)
{
@ -174,6 +174,54 @@ public final class RecipeHelper
}
}
/**
* Add a Chemical Dissolution Chamber recipe.
* @param input - input ItemStack
* @param output - output GasStack
*/
public static void addChemicalDissolutionChamberRecipe(ItemStack input, GasStack output)
{
try {
Class recipeClass = Class.forName("mekanism.common.recipe.RecipeHandler");
Method m = recipeClass.getMethod("addChemicalDissolutionChamberRecipe", ItemStack.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
}
}
/**
* Add a Chemical Washer recipe.
* @param input - input GasStack
* @param output - output GasStack
*/
public static void addChemicalWasherRecipe(GasStack input, GasStack output)
{
try {
Class recipeClass = Class.forName("mekanism.common.recipe.RecipeHandler");
Method m = recipeClass.getMethod("addChemicalWasherRecipe", GasStack.class, GasStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
}
}
/**
* Add a Electrolytic Separator recipe.
* @param input - input GasStack
* @param output - output ItemStack
*/
public static void addChemicalCrystalizerRecipe(GasStack input, ItemStack output)
{
try {
Class recipeClass = Class.forName("mekanism.common.recipe.RecipeHandler");
Method m = recipeClass.getMethod("addChemicalCrystalizerRecipe", GasStack.class, ItemStack.class);
m.invoke(null, input, output);
} catch(Exception e) {
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
}
}
/**
* Add a Metallurgic Infuser recipe.
* @param input - input Infusion

View file

@ -0,0 +1,6 @@
package mekanism.client.gui;
public class GuiChemicalCrystalizer
{
}

View file

@ -0,0 +1,6 @@
package mekanism.client.gui;
public class GuiChemicalDissolutionChamber
{
}

View file

@ -0,0 +1,6 @@
package mekanism.client.gui;
public class GuiChemicalWasher
{
}

View file

@ -0,0 +1,6 @@
package mekanism.common.inventory.container;
public class ContainerChemicalCrystalizer
{
}

View file

@ -0,0 +1,6 @@
package mekanism.common.inventory.container;
public class ContainerChemicalDissolutionChamber
{
}

View file

@ -0,0 +1,6 @@
package mekanism.common.inventory.container;
public class ContainerChemicalWasher
{
}

View file

@ -138,6 +138,36 @@ public final class RecipeHandler
{
Recipe.PRECISION_SAWMILL.put(input, output);
}
/**
* Add a Chemical Dissolution Chamber recipe.
* @param input - input ItemStack
* @param output - output GasStack
*/
public static void addChemicalDissolutionChamberRecipe(ItemStack input, GasStack output)
{
Recipe.CHEMICAL_DISSOLUTION_CHAMBER.put(input, output);
}
/**
* Add a Chemical Washer recipe.
* @param input - input GasStack
* @param output - output GasStack
*/
public static void addChemicalWasherRecipe(GasStack input, GasStack output)
{
Recipe.CHEMICAL_WASHER.put(input, output);
}
/**
* Add a Chemical Crystalizer recipe.
* @param input - input GasStack
* @param output - output ItemStack
*/
public static void addChemicalCrystalizerRecipe(GasStack input, ItemStack output)
{
Recipe.CHEMICAL_CRYSTALIZER.put(input, output);
}
/**
* Gets the InfusionOutput of the InfusionInput in the parameters.
@ -389,7 +419,10 @@ public final class RecipeHandler
CHEMICAL_OXIDIZER(new HashMap<ItemStack, GasStack>()),
CHEMICAL_INJECTION_CHAMBER(new HashMap<AdvancedInput, ItemStack>()),
ELECTROLYTIC_SEPARATOR(new HashMap<FluidStack, ChemicalPair>()),
PRECISION_SAWMILL(new HashMap<ItemStack, ChanceOutput>());
PRECISION_SAWMILL(new HashMap<ItemStack, ChanceOutput>()),
CHEMICAL_DISSOLUTION_CHAMBER(new HashMap<ItemStack, FluidStack>()),
CHEMICAL_WASHER(new HashMap<GasStack, GasStack>()),
CHEMICAL_CRYSTALIZER(new HashMap<GasStack, ItemStack>());
private HashMap recipes;