Package org.spongepowered.api.fluid
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
package org.spongepowered.api.fluid
The base Fluid API that attempts to bridge the Data API and Forges Fluid API.
While
ItemStack
s are literal
stacks of an ItemType
with extra data on
it, FluidStack
are literal stacks
of a FluidType
with some extra data
on it. There is no real detail of what constitutes a FluidStack
as a
tangible item, but more so that there are items in the world that are
"containers" of either one or several FluidStack
s.
In vanilla, there are very few items that contain a FluidStack
.
The first item that comes to mind is a
ItemTypes.WATER_BUCKET
will always contain
a FluidStack
of
FluidTypes.WATER
with the quantity
of exactly 1000mB
. The FluidStack
itself on the bucket cannot
be changed, but the ItemStack
would be changed from being a water
bucket to just a normal empty bucket. This is also the case for lava buckets.
-
ClassDescriptionRepresents a stack of a particular
FluidType
and volume measured in "milliBuckets" where1000
mB is equal to 1ItemTypes.BUCKET
.Represents a particular "state" that can exist at aServerLocation
with a particularBlockType
and variousValue.Immutable
s defining the information for the "block".AnDataHolderBuilder.Immutable
for aFluidState
.