/** * Whether or not this PressurizedReactants's ItemStack entry's item type is equal to the item * type of the given item. * * @param stack - stack to check * @return if the stack's item type is contained in this PressurizedReactants */ public boolean containsType(ItemStack stack) { if (stack == null || stack.stackSize == 0) { return false; } return StackUtils.equalsWildcard(stack, theSolid); }
/** * Actual implementation of meetsInput(), performs the checks. * * @param input - input to check * @return if the input meets this input's requirements */ public boolean meets(PressurizedInput input) { if (input == null || !input.isValid()) { return false; } if (!(StackUtils.equalsWildcard(input.theSolid, theSolid) && input.theFluid.isFluidEqual(theFluid) && input.theGas.isGasEqual(theGas))) { return false; } return input.theSolid.stackSize >= theSolid.stackSize && input.theFluid.amount >= theFluid.amount && input.theGas.amount >= theGas.amount; }