use of net.minecraftforge.fluids.IFluidTank in project gregtech6 by GregTech6.
the class TileEntityBase01Root method drain.
public FluidStack drain(ForgeDirection aDirection, int aAmountToDrain, boolean aDoDrain) {
if (aAmountToDrain <= 0)
return null;
IFluidTank tTank = getFluidTankDrainable(UT.Code.side(aDirection), null);
if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0)
return null;
FluidStack rDrained = tTank.drain(aAmountToDrain, aDoDrain);
if (rDrained != null && aDoDrain)
updateInventory();
return rDrained;
}
use of net.minecraftforge.fluids.IFluidTank in project gregtech6 by GregTech6.
the class TileEntityBase01Root method drain.
public FluidStack drain(ForgeDirection aDirection, FluidStack aFluid, boolean aDoDrain) {
if (aFluid == null || aFluid.amount <= 0)
return null;
IFluidTank tTank = getFluidTankDrainable(UT.Code.side(aDirection), aFluid);
if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 || !tTank.getFluid().isFluidEqual(aFluid))
return null;
FluidStack rDrained = tTank.drain(aFluid.amount, aDoDrain);
if (rDrained != null && aDoDrain)
updateInventory();
return rDrained;
}
use of net.minecraftforge.fluids.IFluidTank in project gregtech6 by GregTech6.
the class TileEntityBase01Root method drain.
public FluidStack drain(MultiTileEntityMultiBlockPart aPart, byte aDirection, FluidStack aFluid, boolean aDoDrain) {
if (aFluid == null || aFluid.amount <= 0)
return null;
IFluidTank tTank = getFluidTankDrainable(aPart, UT.Code.side(aDirection), aFluid);
if (tTank == null || tTank.getFluid() == null || tTank.getFluidAmount() == 0 || !tTank.getFluid().isFluidEqual(aFluid))
return null;
FluidStack rDrained = tTank.drain(aFluid.amount, aDoDrain);
if (rDrained != null && aDoDrain)
updateInventory();
return rDrained;
}
Aggregations