electrodynamics/archive/java/resonantinduction/mechanical/fluid/LiquidTank.java
2014-01-11 17:44:07 +08:00

40 lines
780 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 only supports liquids
*
* @author DarkGuardsman
*/
public class LiquidTank extends FluidTank
{
public LiquidTank(int capacity)
{
super(capacity);
}
public LiquidTank(FluidStack stack, int capacity)
{
super(stack, capacity);
}
public LiquidTank(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;
}
}