2012-11-11 02:23:16 +00:00
|
|
|
package net.minecraftforge.liquids;
|
|
|
|
|
|
|
|
import net.minecraftforge.common.ForgeDirection;
|
|
|
|
|
|
|
|
public interface ITankContainer {
|
2012-11-13 02:40:42 +00:00
|
|
|
|
2012-11-11 02:23:16 +00:00
|
|
|
/**
|
|
|
|
* Fills liquid into internal tanks, distribution is left to the ITankContainer.
|
|
|
|
* @param from Orientation the liquid is pumped in from.
|
|
|
|
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
|
|
|
* @param doFill If false filling will only be simulated.
|
|
|
|
* @return Amount of resource that was filled into internal tanks.
|
|
|
|
*/
|
|
|
|
int fill(ForgeDirection from, LiquidStack resource, boolean doFill);
|
|
|
|
/**
|
2012-11-13 02:40:42 +00:00
|
|
|
* Fills liquid into the specified internal tank.
|
2012-11-11 02:23:16 +00:00
|
|
|
* @param from Orientation the liquid is pumped in from.
|
|
|
|
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
|
|
|
* @param doFill If false filling will only be simulated.
|
|
|
|
* @return Amount of resource that was filled into internal tanks.
|
|
|
|
*/
|
|
|
|
int fill(int tankIndex, LiquidStack resource, boolean doFill);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Drains liquid out of internal tanks, distribution is left to the ITankContainer.
|
|
|
|
* @param from Orientation the liquid is drained to.
|
|
|
|
* @param maxDrain Maximum amount of liquid to drain.
|
|
|
|
* @param doDrain If false draining will only be simulated.
|
|
|
|
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
|
|
|
*/
|
|
|
|
LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain);
|
|
|
|
/**
|
|
|
|
* Drains liquid out of the specified internal tank.
|
|
|
|
* @param from Orientation the liquid is drained to.
|
|
|
|
* @param maxDrain Maximum amount of liquid to drain.
|
|
|
|
* @param doDrain If false draining will only be simulated.
|
|
|
|
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
|
|
|
*/
|
|
|
|
LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain);
|
2012-11-13 02:40:42 +00:00
|
|
|
|
2012-11-11 02:23:16 +00:00
|
|
|
/**
|
2012-11-13 02:40:42 +00:00
|
|
|
* @param direction tank side: UNKNOWN for default tank set
|
2012-11-11 02:23:16 +00:00
|
|
|
* @return Array of {@link LiquidTank}s contained in this ITankContainer
|
|
|
|
*/
|
2012-11-13 02:40:42 +00:00
|
|
|
ILiquidTank[] getTanks(ForgeDirection direction);
|
|
|
|
|
2012-11-11 02:23:16 +00:00
|
|
|
}
|