Package org.spongepowered.api.fluid
Interface FluidState
-
- All Superinterfaces:
CopyableDataHolder
,DataHolder
,DataHolder.Immutable<FluidState>
,DataSerializable
,SerializableDataHolder
,SerializableDataHolder.Immutable<FluidState>
,State<FluidState>
,ValueContainer
public interface FluidState extends State<FluidState>
Represents a particular "state" that can exist at aServerLocation
with a particularBlockType
and variousValue.Immutable
s defining the information for the "block". Note that normally, there may exist only a single instance of a particularFluidState
as they are immutable, a particular instance may be cached for various uses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FluidState.Builder
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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockState
block()
Gets theBlockState
that best represents thisFluidState
.static FluidState.Builder
builder()
Creates a newFluidState.Builder
for buildingFluidState
s.static FluidState
fromString(String id)
boolean
isEmpty()
FluidType
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 Detail
-
builder
static FluidState.Builder builder()
Creates a newFluidState.Builder
for buildingFluidState
s.- Returns:
- The builder
-
fromString
static FluidState fromString(String id)
-
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()
-
-