Testing the creation of hell
This commit is contained in:
parent
796e75b1f9
commit
a2b006105e
2587 changed files with 0 additions and 129617 deletions
|
@ -1,79 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.api.alchemy;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AlchemicalPotionCreationHandler
|
||||
{
|
||||
public static ArrayList<AlchemyPotionHandlerComponent> registeredPotionEffects = new ArrayList();
|
||||
|
||||
public static void addPotion(ItemStack itemStack, int potionID, int tickDuration)
|
||||
{
|
||||
registeredPotionEffects.add(new AlchemyPotionHandlerComponent(itemStack, potionID, tickDuration));
|
||||
}
|
||||
|
||||
public static int getPotionIDForStack(ItemStack itemStack)
|
||||
{
|
||||
for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects)
|
||||
{
|
||||
if (aphc.compareItemStack(itemStack))
|
||||
{
|
||||
return aphc.getPotionID();
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int getPotionTickDurationForStack(ItemStack itemStack)
|
||||
{
|
||||
{
|
||||
for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects)
|
||||
{
|
||||
if (aphc.compareItemStack(itemStack))
|
||||
{
|
||||
return aphc.getTickDuration();
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean containsRegisteredPotionIngredient(ItemStack[] stackList)
|
||||
{
|
||||
for (ItemStack is : stackList)
|
||||
{
|
||||
for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects)
|
||||
{
|
||||
if (aphc.compareItemStack(is))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getRegisteredPotionIngredientPosition(ItemStack[] stackList)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (ItemStack is : stackList)
|
||||
{
|
||||
for (AlchemyPotionHandlerComponent aphc : registeredPotionEffects)
|
||||
{
|
||||
if (aphc.compareItemStack(is))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue