1.0.2 push
This commit is contained in:
parent
6e4de4f6e9
commit
4070e560d1
17 changed files with 701 additions and 36 deletions
|
@ -0,0 +1,52 @@
|
|||
package WayofTime.alchemicalWizardry.common.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
|
||||
|
||||
public class CombinedPotionHandlerComponent
|
||||
{
|
||||
private int potionID;
|
||||
private int req1;
|
||||
private int req2;
|
||||
private int tickDuration;
|
||||
|
||||
public CombinedPotionHandlerComponent(int potionID, int req1, int req2, int tickDuration)
|
||||
{
|
||||
this.potionID = potionID;
|
||||
this.req1 = req1;
|
||||
this.req2 = req2;
|
||||
this.tickDuration = tickDuration;
|
||||
}
|
||||
|
||||
public boolean doesFlaskContentsMatch(ItemStack flaskStack)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = AlchemyFlask.getEffects(flaskStack);
|
||||
|
||||
boolean bool1 = false;
|
||||
boolean bool2 = false;
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
{
|
||||
if (aph.getPotionID() == req1)
|
||||
{
|
||||
bool1 = true;
|
||||
}
|
||||
if (aph.getPotionID() == req2)
|
||||
{
|
||||
bool2 = true;
|
||||
}
|
||||
if(bool1&&bool2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue