Class FluidState.Builder

java.lang.Object
dev.wyck.worldgen.material.FluidState.Builder
Enclosing interface:
FluidState

@AsOf("3.0.0") public static final class FluidState.Builder extends Object
Builder for FluidState.
Since:
3.0.0
  • Method Details

    • fluid

      @AsOf("3.0.0") public FluidState.Builder fluid(FluidType fluid)
      Sets the fluid of this builder.
      Parameters:
      fluid - the fluid
      Returns:
      this builder
      Since:
      3.0.0
    • source

      @AsOf("3.0.0") public FluidState.Builder source()
      Marks the built state as a source block. Source states always hold an amount of 8, discarding any previously set amount(int).
      Returns:
      this builder
      Since:
      3.0.0
    • amount

      @AsOf("3.0.0") public FluidState.Builder amount(int amount)
      Marks the built state as flowing with the given amount.
      Parameters:
      amount - the amount of fluid, from 1 to 8
      Returns:
      this builder
      Since:
      3.0.0
    • falling

      @AsOf("3.0.0") public FluidState.Builder falling(boolean falling)
      Sets whether the fluid in the built state is falling.
      Parameters:
      falling - whether the fluid is falling
      Returns:
      this builder
      Since:
      3.0.0
    • build

      @AsOf("3.0.0") public FluidState build()
      Builds the fluid state.
      Returns:
      the built fluid state
      Throws:
      IllegalStateException - if no fluid was set
      Since:
      3.0.0