Interface FluidState


public interface FluidState
The fluid held by a block.
Since:
0.1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns how many eighths of the block the fluid fills.
    Returns the fluid.
    boolean
    Returns true when the block holds no fluid.
    boolean
    Returns true for fluid falling down a column.
    boolean
    Returns true for a source.
  • Method Details

    • fluid

      TypedKey<Fluid> fluid()
      Returns the fluid.: FluidKeys.WATER, FluidKeys.LAVA, or FluidKeys.EMPTY when the block holds none
      Returns:
      the fluid
      Since:
      0.1.0
    • isEmpty

      boolean isEmpty()
      Returns true when the block holds no fluid.
      Returns:
      true when the block holds no fluid
      Since:
      0.1.0
    • isSource

      boolean isSource()
      Returns true for a source.
      Returns:
      true for a source
      Since:
      0.1.0
    • isFalling

      boolean isFalling()
      Returns true for fluid falling down a column.: a full block that is not a source
      Returns:
      true for fluid falling down a column
      Since:
      0.1.0
    • amount

      int amount()
      Returns how many eighths of the block the fluid fills.: 8 for a source or falling fluid, down to 1 for flowing fluid, 0 for no fluid
      Returns:
      how many eighths of the block the fluid fills
      Since:
      0.1.0