This commit is contained in:
WayofTime 2014-04-02 19:07:11 -04:00
parent a1ca81423b
commit d229da6272
75 changed files with 1868 additions and 1866 deletions

View file

@ -0,0 +1,52 @@
package WayofTime.alchemicalWizardry.api.alchemy;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class AlchemyPotionHandlerComponent
{
private ItemStack itemStack;
private int potionID;
private int tickDuration;
public AlchemyPotionHandlerComponent(ItemStack itemStack, int potionID, int tickDuration)
{
this.itemStack = itemStack;
this.potionID = potionID;
this.tickDuration = tickDuration;
}
public boolean compareItemStack(ItemStack comparedStack)
{
if (comparedStack != null && itemStack != null)
{
if (comparedStack.getItem() instanceof ItemBlock)
{
if (itemStack.getItem() instanceof ItemBlock)
{
return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage();
}
} else if (!(itemStack.getItem() instanceof ItemBlock))
{
return comparedStack.itemID == itemStack.itemID && comparedStack.getItemDamage() == itemStack.getItemDamage();
}
}
return false;
}
public ItemStack getItemStack()
{
return itemStack;
}
public int getPotionID()
{
return this.potionID;
}
public int getTickDuration()
{
return this.tickDuration;
}
}