Package org.spongepowered.api.fluid
Interface FluidState
- All Superinterfaces:
CopyableDataHolder,DataHolder,DataHolder.Immutable<FluidState>,DataSerializable,SerializableDataHolder,SerializableDataHolder.Immutable<FluidState>,State<FluidState>,ValueContainer
Represents a particular "state" that can exist at a
ServerLocation with
a particular BlockType and various Value.Immutables defining
the information for the "block". Note that normally, there may exist only
a single instance of a particular FluidState as they are immutable,
a particular instance may be cached for various uses.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAnDataHolderBuilder.Immutablefor aFluidState.Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.MutableNested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolder
SerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable -
Method Summary
Modifier and TypeMethodDescriptionblock()Gets theBlockStatethat best represents thisFluidState.static FluidState.Builderbuilder()Creates a newFluidState.Builderfor buildingFluidStates.static FluidStatefromString(String id) booleanisEmpty()type()Gets the parentFluidTypethat this state is based on.Methods inherited from interface org.spongepowered.api.data.DataHolder.Immutable
mergeWith, mergeWith, transform, transform, with, with, with, without, without, withoutMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainerMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawDataMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Immutable
copy, withRawDataMethods inherited from interface org.spongepowered.api.state.State
cycleStateProperty, cycleStateProperty, cycleValue, cycleValue, findStateProperty, stateProperties, stateProperty, stateProperty, statePropertyMap, statePropertyValues, toString, withStateProperty, withStateProperty
-
Method Details
-
builder
Creates a newFluidState.Builderfor buildingFluidStates.- Returns:
- The builder
-
fromString
-
block
BlockState block()Gets theBlockStatethat best represents thisFluidState.The type does not include location based information such as tanks or inventories. This is simply a block state that can be used for volumes such as
Schematics orWorlds that are serialized and deserialized.- Returns:
- The type of block
-
type
FluidType type()Gets the parentFluidTypethat this state is based on. Much likeBlockTypeversusBlockStates, there can be many to one relationships between the two.- Returns:
- The fluid type
-
isEmpty
boolean isEmpty()
-