public static interface FluidStack.Builder extends DataBuilder<FluidStack>
Modifier and Type | Method and Description |
---|---|
FluidStack |
build()
Builds a new
FluidStack based on the desired volume and
FluidType . |
FluidStack.Builder |
fluid(FluidType fluidType)
Sets the
FluidType to use to build the FluidStack . |
FluidStack.Builder |
from(FluidStack value)
Resets this builder to the values of the given built object.
|
FluidStack.Builder |
from(FluidStackSnapshot fluidStackSnapshot)
Resets and fills this builder with all the information from the
provided
FluidStackSnapshot . |
FluidStack.Builder |
reset()
Resets this builder to a "default" state such that there is no
remaining data to set.
|
FluidStack.Builder |
volume(int volume)
Sets the desired volume of the
FluidStack . |
build
FluidStack.Builder fluid(FluidType fluidType)
FluidType
to use to build the FluidStack
.fluidType
- The fluid typeFluidStack.Builder volume(int volume)
FluidStack
.
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.
volume
- The volumeFluidStack build()
FluidStack
based on the desired volume and
FluidType
. If either are not set (invalid), an
IllegalStateException
may be thrown.FluidStack.Builder from(FluidStackSnapshot fluidStackSnapshot)
FluidStackSnapshot
.fluidStackSnapshot
- The fluid stack snapshot to copy data fromFluidStack.Builder from(FluidStack value)
ResettableBuilder
from
in interface DataBuilder<FluidStack>
from
in interface ResettableBuilder<FluidStack,DataBuilder<FluidStack>>
value
- The built objectFluidStack.Builder reset()
ResettableBuilder
reset
in interface DataBuilder<FluidStack>
reset
in interface ResettableBuilder<FluidStack,DataBuilder<FluidStack>>