Interface IFluidTank

All Known Implementing Classes:
FluidTank

@Deprecated(since="1.21.9", forRemoval=true) public interface IFluidTank
Deprecated, for removal: This API element is subject to removal in a future version.
Use ResourceHandler with a FluidResource instead.
This interface represents a Fluid Tank. IT IS NOT REQUIRED but is provided for convenience. You are free to handle Fluids in any way that you wish - this is simply an easy default way. DO NOT ASSUME that these objects are used internally in all cases.
  • Method Summary

    Modifier and Type
    Method
    Description
    drain(int maxDrain, IFluidHandler.FluidAction action)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Details

    • getFluid

      FluidStack getFluid()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      FluidStack representing the fluid in the tank, null if the tank is empty.
    • getFluidAmount

      int getFluidAmount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      Current amount of fluid in the tank.
    • getCapacity

      int getCapacity()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      Capacity of this fluid tank.
    • isFluidValid

      boolean isFluidValid(FluidStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      stack - Fluidstack holding the Fluid to be queried.
      Returns:
      If the tank can hold the fluid (EVER, not at the time of query).
    • fill

      int fill(FluidStack resource, IFluidHandler.FluidAction action)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      resource - FluidStack attempting to fill the tank.
      action - If SIMULATE, the fill will only be simulated.
      Returns:
      Amount of fluid that was accepted (or would be, if simulated) by the tank.
    • drain

      FluidStack drain(int maxDrain, IFluidHandler.FluidAction action)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      maxDrain - Maximum amount of fluid to be removed from the container.
      action - If SIMULATE, the drain will only be simulated.
      Returns:
      Amount of fluid that was removed (or would be, if simulated) from the tank.
    • drain

      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      resource - Maximum amount of fluid to be removed from the container.
      action - If SIMULATE, the drain will only be simulated.
      Returns:
      FluidStack representing fluid that was removed (or would be, if simulated) from the tank.