package mekanism.api.gas; import net.minecraft.item.ItemStack; /** * Implement this in your item class if it can store or transfer certain gasses. * @author AidanBrady * */ public interface IGasItem extends IGasStorage { /** * Gets the rate of transfer this item can handle. * @return */ public int getRate(); /** * Adds a defined about of a certain gas to a Storage Tank. * @param itemstack - the itemstack of a Storage Tank to add gas to * @param type - the type of gas to add * @param amount - the amount of gas to add * @return used gas */ public int addGas(ItemStack itemstack, GasStack stack); /** * Removes the defined amount of a certain gas from the item. * @param itemstack - the itemstack of a Storage Tank to remove gas from * @param type - the type of gas to remove * @param amount - the amount of gas to remove * @return removed gas */ public GasStack removeGas(ItemStack itemstack, int amount); /** * Whether or not this storage tank be given a specific gas. * @param itemstack - the itemstack to check * @param type - the type of gas the tank can possibly receive * @return if the item be charged */ public boolean canReceiveGas(ItemStack itemstack, Gas type); /** * Whether or not this energized item can give a gas receiver a certain amount of gas. * @param itemstack - the itemstack to check * @param type - the type of gas the tank can possibly provide * @return if the item can provide gas */ public boolean canProvideGas(ItemStack itemstack, Gas type); }