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.Immutable
s 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
Modifier and TypeInterfaceDescriptionstatic interface
AnDataHolderBuilder.Immutable
for aFluidState
.Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
Nested 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 theBlockState
that best represents thisFluidState
.static FluidState.Builder
builder()
Creates a newFluidState.Builder
for buildingFluidState
s.static FluidState
fromString
(String id) boolean
isEmpty()
type()
Gets the parentFluidType
that this state is based on.Methods inherited from interface org.spongepowered.api.data.DataHolder.Immutable
mergeWith, mergeWith, transform, transform, with, with, with, without, without, without
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawData
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Immutable
copy, withRawData
Methods 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.Builder
for buildingFluidState
s.- Returns:
- The builder
-
fromString
-
block
BlockState block()Gets theBlockState
that 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
Schematic
s orWorld
s that are serialized and deserialized.- Returns:
- The type of block
-
type
FluidType type()Gets the parentFluidType
that this state is based on. Much likeBlockType
versusBlockState
s, there can be many to one relationships between the two.- Returns:
- The fluid type
-
isEmpty
boolean isEmpty()
-