Package org.spongepowered.api.fluid
Interface FluidStackSnapshot
- All Superinterfaces:
CopyableDataHolder,DataHolder,DataHolder.Immutable<FluidStackSnapshot>,DataSerializable,SerializableDataHolder,SerializableDataHolder.Immutable<FluidStackSnapshot>,ValueContainer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.MutableNested 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.Builderbuilder()Creates a newFluidStackSnapshot.Builderto build a newFluidStackSnapshot.Creates a newFluidStackbased on this snapshot.fluid()Gets theFluidTypeof this snapshot.intvolume()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, withoutMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainerMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawDataMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Immutable
copy, withRawData
-
Method Details
-
builder
Creates a newFluidStackSnapshot.Builderto build a newFluidStackSnapshot.- Returns:
- The new builder
-
fluid
FluidType fluid()Gets theFluidTypeof 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 newFluidStackbased on this snapshot.- Returns:
- The newly created stack
-