Expand description
Fluid state <-> block state conversions.
Responsible for deriving FluidState from BlockState
and converting FluidState back into BlockStateId.
Constantsยง
Functionsยง
- affects_
flow_ ๐with - fluid_
state_ to_ block - Converts a
FluidStateinto aBlockStateIddirectly without preserving any block. - fluid_
state_ to_ block_ with_ existing - Converts a
FluidStateinto aBlockStateId, preserving the identity of an existing block. - get_
flow - Returns vanilla
FlowingFluid.getFlowfor this fluid state. - get_
flow_ ๐with - get_
fluid_ state - Gets the fluid state at a given position.
- get_
fluid_ state_ from_ block - Gets the fluid state from a raw
BlockStateId. - get_
height - Returns the effective fluid height at a position, accounting for fluid above.
If the same fluid type occupies the block directly above (
hasSameAbove), the height is1.0(full block). Otherwise it isget_own_height(fluid_state). - get_
height_ ๐with - get_
own_ height - Returns the fluidโs own height as a fraction of a full block.
amount / 9.0โ source blocks haveamount = 8, giving0.888... Flowing blocks range fromamount = 1(thin) to7(tall). - is_
solid_ ๐face_ with - lava_id
- Gets the lava source fluid ref from the registry.
- water_
id - Gets the water source fluid ref from the registry.