Class FluidState.Builder
java.lang.Object
dev.wyck.worldgen.material.FluidState.Builder
- Enclosing interface:
FluidState
Builder for
FluidState.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionamount(int amount) Marks the built state as flowing with the given amount.build()Builds the fluid state.falling(boolean falling) Sets whether the fluid in the built state is falling.Sets the fluid of this builder.source()Marks the built state as a source block.
-
Method Details
-
fluid
Sets the fluid of this builder.- Parameters:
fluid- the fluid- Returns:
- this builder
- Since:
- 3.0.0
-
source
Marks the built state as a source block. Source states always hold an amount of8, discarding any previously setamount(int).- Returns:
- this builder
- Since:
- 3.0.0
-
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
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
Builds the fluid state.- Returns:
- the built fluid state
- Throws:
IllegalStateException- if no fluid was set- Since:
- 3.0.0
-