Package org.spongepowered.api.fluid
Interface FluidStackSnapshot
-
- All Superinterfaces:
CopyableDataHolder
,DataHolder
,DataHolder.Immutable<FluidStackSnapshot>
,DataSerializable
,SerializableDataHolder
,SerializableDataHolder.Immutable<FluidStackSnapshot>
,ValueContainer
public interface FluidStackSnapshot extends SerializableDataHolder.Immutable<FluidStackSnapshot>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FluidStackSnapshot.Builder
-
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 static FluidStackSnapshot.Builder
builder()
Creates a newFluidStackSnapshot.Builder
to build a newFluidStackSnapshot
.FluidStack
createStack()
Creates a newFluidStack
based on this snapshot.FluidType
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 Detail
-
builder
static FluidStackSnapshot.Builder builder()
Creates a newFluidStackSnapshot.Builder
to build a newFluidStackSnapshot
.- Returns:
- The new builder
-
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
-
-