41 lines
773 B
Java
41 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;
|
||
|
}
|
||
|
|
||
|
}
|