1.7.10 commit of I-still-can't-do-any-branches
This commit is contained in:
parent
6aec0a87ea
commit
cabc296b21
763 changed files with 64290 additions and 0 deletions
|
@ -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.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
} else if (!(itemStack.getItem() instanceof ItemBlock))
|
||||
{
|
||||
return comparedStack.getItem().equals(itemStack.getItem()) && comparedStack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemStack getItemStack()
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public int getPotionID()
|
||||
{
|
||||
return this.potionID;
|
||||
}
|
||||
|
||||
public int getTickDuration()
|
||||
{
|
||||
return this.tickDuration;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue