2014-01-17 21:29:39 -05:00
|
|
|
package mekanism.api;
|
|
|
|
|
|
|
|
import mekanism.api.gas.Gas;
|
|
|
|
import mekanism.common.util.StackUtils;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
public class AdvancedInput
|
|
|
|
{
|
|
|
|
public ItemStack itemStack;
|
2014-03-07 19:00:25 -06:00
|
|
|
|
2014-01-17 21:29:39 -05:00
|
|
|
public Gas gasType;
|
2014-03-07 19:00:25 -06:00
|
|
|
|
2014-01-17 21:29:39 -05:00
|
|
|
public AdvancedInput(ItemStack item, Gas gas)
|
|
|
|
{
|
|
|
|
itemStack = item;
|
|
|
|
gasType = gas;
|
|
|
|
}
|
2014-03-07 19:00:25 -06:00
|
|
|
|
2014-01-17 21:29:39 -05:00
|
|
|
public boolean isValid()
|
|
|
|
{
|
|
|
|
return itemStack != null && gasType != null;
|
|
|
|
}
|
2014-03-07 19:00:25 -06:00
|
|
|
|
2014-01-17 21:29:39 -05:00
|
|
|
public boolean matches(AdvancedInput input)
|
|
|
|
{
|
|
|
|
return StackUtils.equalsWildcard(itemStack, input.itemStack) && input.itemStack.stackSize >= itemStack.stackSize;
|
|
|
|
}
|
|
|
|
}
|