Added alloy smelter recipes to API
This commit is contained in:
parent
049afe676d
commit
579558827b
1 changed files with 23 additions and 0 deletions
|
@ -9,6 +9,8 @@ public final class TechRebornAPI {
|
|||
|
||||
public static ArrayList<CentrifugeRecipie> centrifugeRecipies = new ArrayList<CentrifugeRecipie>();
|
||||
public static ArrayList<BlastFurnaceRecipe> blastFurnaceRecipes = new ArrayList<BlastFurnaceRecipe>();
|
||||
public static ArrayList<AlloySmelterRecipe> alloySmelterRecipes = new ArrayList<AlloySmelterRecipe>();
|
||||
|
||||
|
||||
public static void registerCentrifugeRecipe(CentrifugeRecipie recipie)
|
||||
{
|
||||
|
@ -60,6 +62,27 @@ public final class TechRebornAPI {
|
|||
blastFurnaceRecipes.add(new BlastFurnaceRecipe(recipie.getInput2(), recipie.getInput1(), recipie.output1, recipie.output2, recipie.tickTime, recipie.minHeat));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void registerAlloySmelterRecipe(AlloySmelterRecipe recipie) {
|
||||
boolean shouldAdd = true;
|
||||
for (AlloySmelterRecipe alloySmelterRecipe : alloySmelterRecipes) {
|
||||
if (ItemUtils.isItemEqual(alloySmelterRecipe.getInput1(), recipie.getInput1(), false, true) && ItemUtils.isItemEqual(alloySmelterRecipe.getInput2(), recipie.getInput2(), false, true)) {
|
||||
{
|
||||
try {
|
||||
throw new RegisteredItemRecipe(
|
||||
"Item "
|
||||
+ recipie.getInput1()
|
||||
.getUnlocalizedName()
|
||||
+ " and " + recipie.getInput2().getUnlocalizedName() + " is already being used in a recipe for the Alloy Smelter");
|
||||
} catch (RegisteredItemRecipe registeredItemRecipe) {
|
||||
registeredItemRecipe.printStackTrace();
|
||||
shouldAdd = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void addRollingMachinceRecipe(ItemStack output,
|
||||
|
|
Loading…
Add table
Reference in a new issue