Package org.spongepowered.api.fluid
Interface FluidStackSnapshot
- All Superinterfaces:
CopyableDataHolder
,DataHolder
,DataHolder.Immutable<FluidStackSnapshot>
,DataSerializable
,SerializableDataHolder
,SerializableDataHolder.Immutable<FluidStackSnapshot>
,ValueContainer
-
Nested Class Summary
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 TypeMethodDescriptionstatic FluidStackSnapshot.Builder
builder()
Creates a newFluidStackSnapshot.Builder
to build a newFluidStackSnapshot
.Creates a newFluidStack
based on this snapshot.fluid()
Gets theFluidType
of this snapshot.int
volume()
Gets the volume of this snapshot.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
-
Method Details
-
builder
Creates a newFluidStackSnapshot.Builder
to build a newFluidStackSnapshot
.- Returns:
- The new builder
-
fluid
FluidType fluid()Gets theFluidType
of this snapshot.- Returns:
- The fluid type
-
volume
int volume()Gets the volume of this snapshot.Note that the volume is measured in "milli buckets", otherwise read as
mB
. The scaling is as follows: 1 bucket = 1000mB, whereas 1 block usually equals 1000mB.- Returns:
- The volume
-
createStack
FluidStack createStack()Creates a newFluidStack
based on this snapshot.- Returns:
- The newly created stack
-