Fluid

@CataloguedBy(catalogue = Fluids::class)
interface Fluid : StateHolder<FluidState> , Keyed

A fluid with certain properties.

The design of this is very similar to that of the Block.

Functions

Link copied to clipboard
abstract fun getProperty(name: String): Property<*>?

Gets the property with the given name for this holder, or returns null if there is no property with the given name for this holder.

Link copied to clipboard
abstract fun isEmpty(): Boolean

If this fluid is an empty fluid.

Link copied to clipboard
@NotNull
abstract fun key(): @NotNull Key

Properties

Link copied to clipboard
@get:JvmName(name = "availableProperties")
abstract val availableProperties: @Unmodifiable Collection<Property<*>>

All of the properties that can be set on the states of this holder.

Link copied to clipboard
@get:JvmName(name = "bucket")
abstract val bucket: ItemType

The type of the bucket this fluid can be held in.

Link copied to clipboard
@get:JvmName(name = "defaultState")
abstract val defaultState: FluidState

The default state that this holder will appear in.

Link copied to clipboard
@get:JvmName(name = "explosionResistance")
abstract val explosionResistance: Double

The value for this fluid's resistance to explosions.

Link copied to clipboard
@get:JvmName(name = "states")
abstract val states: @Unmodifiable List<FluidState>

All of the states that this holder can be in.