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 aServerLocationwith a particularBlockTypeand variousValue.Immutables defining the information for the "block". Note that normally, there may exist only a single instance of a particularFluidStateas they are immutable, a particular instance may be cached for various uses. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFluidState.BuilderAnDataHolderBuilder.Immutablefor 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 BlockStateblock()Gets theBlockStatethat best represents thisFluidState.static FluidState.Builderbuilder()Creates a newFluidState.Builderfor buildingFluidStates.static FluidStatefromString(String id)booleanisEmpty()FluidTypetype()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, 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.Builderfor buildingFluidStates.- Returns:
 - The builder
 
 
- 
fromString
static FluidState fromString(String id)
 
- 
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()
 
 - 
 
 -