resonant-induction/archive/java/resonantinduction/mechanical/fluid/GasTank.java
2014-01-11 17:44:07 +08:00

40 lines
773 B
Java

package resonantinduction.mechanical.fluid;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
/**
* Version of the fluid tank that is restricted to gases only
*
* @author DarkGuardsman
*/
public class GasTank extends FluidTank
{
public GasTank(int capacity)
{
super(capacity);
}
public GasTank(FluidStack stack, int capacity)
{
super(stack, capacity);
}
public GasTank(Fluid fluid, int amount, int capacity)
{
super(fluid, amount, capacity);
}
@Override
public int fill(FluidStack resource, boolean doFill)
{
if (resource != null && resource.getFluid() != null && resource.getFluid().isGaseous())
{
return super.fill(resource, doFill);
}
return 0;
}
}