Testing the creation of hell
This commit is contained in:
parent
796e75b1f9
commit
a2b006105e
2587 changed files with 0 additions and 129617 deletions
|
@ -0,0 +1,60 @@
|
|||
package WayofTime.alchemicalWizardry.api.altarRecipeRegistry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class AltarRecipeRegistry
|
||||
{
|
||||
public static List<AltarRecipe> altarRecipes = new LinkedList();
|
||||
|
||||
public static void registerAltarRecipe(ItemStack result, ItemStack requiredItem, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
altarRecipes.add(new AltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled));
|
||||
}
|
||||
|
||||
public static void registerAltarOrbRecipe(ItemStack orbStack, int minTier, int consumptionRate)
|
||||
{
|
||||
registerAltarRecipe(null, orbStack, minTier, 0, consumptionRate, 0, true);
|
||||
}
|
||||
|
||||
public static boolean isRequiredItemValid(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack getItemForItemAndTier(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return ItemStack.copyItemStack(recipe.getResult());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static AltarRecipe getAltarRecipeForItemAndTier(ItemStack testItem, int currentTierAltar)
|
||||
{
|
||||
for (AltarRecipe recipe : altarRecipes)
|
||||
{
|
||||
if (recipe.doesRequiredItemMatch(testItem, currentTierAltar))
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue