Package alexiil.mc.lib.attributes.fluid
The base package for
fluid
management.
As vanilla minecraft doesn't use fluids as much as items there are a few key differences between how this package
works verses alexiil.mc.lib.attributes.item
:
- Instead of
ItemStack
we haveFluidVolume
(with an amount) andFluidKey
(without an amount) - Slots are called "tanks"
- Tanks/Slots do not have a pre-defined maximum amount (and neither do fluids themselves as that depends wholly on the container).
- The units for fluids are fractional amounts based on 1+0/1 being equal to 1 bucket, stored in
FluidAmount
.
-
Interface Summary Interface Description FixedFluidInv AFixedFluidInvView
that can have it's contents changed.FixedFluidInvView A view of a fixed inventory for fluids, where the number of tanks never changes, and every tank is "simple": The fluid will stay in the tank until it is removed or changed by something else.FluidContainerRegistry.FluidFillFunction FunctionalInterface
version ofFluidContainerRegistry.FluidFillHandler
.FluidContainerRegistry.FluidFillHandler.StackReturnFunc Stack return function forFluidContainerRegistry.FluidFillHandler.insert(ItemStack, FluidVolume, Simulation, StackReturnFunc)
FluidExtractable Defines an object that can have fluids extracted from it.FluidInsertable Defines an object that can have fluids inserted into it.FluidInvAmountChangeListener Deprecated. FluidInvAmountChangeListener_F FluidInvTankChangeListener FluidProviderItem Deprecated. This has been completely replaced by item-based attribute accessors andFluidContainerRegistry
.FluidTransferable Combined interface forFluidInsertable
andFluidExtractable
.GroupedFluidInv A modifiable version ofGroupedFluidInvView
, except that all modification methods are provided byFluidExtractable
andFluidInsertable
.GroupedFluidInvView ICustomBucketItem Items that implementBucketItem
should implement this interface to ensure that LBA gets the correctItemStack
from filling this with a fluid.LimitedFixedFluidInv A type ofFixedFluidInv
that wraps an existingFixedFluidInv
and provides custom control over the actual modification of the wrappedFixedFluidInv
.LimitedFixedFluidInv.FluidTankLimitRule A rule for a set of tanks.LimitedGroupedFluidInv LimitedGroupedFluidInv.FluidLimitRule A rule that is applied once for everyFluidKey
that matches theFluidFilter
that was used inLimitedGroupedFluidInv.getRule(FluidFilter)
. -
Class Summary Class Description FluidAttributes Central storage for fluidAttribute
instances.FluidContainerRegistry MapsItem
instances to empty and full containers.FluidContainerRegistry.FluidFillHandler Fill handler for an emptyItemStack
.FluidInvUtil 4 base methods for interacting aReference
of anItemStack
with aFixedFluidInv
,FluidTransferable
, orFluidInsertable
&FluidExtractable
pair.FluidItemUtil Various utilities for dealing with fluids contained in singleItemStack
s.FluidVolumeUtil FluidVolumeUtil.FluidTankInteraction FluidVolumeUtil.FluidTransferResult GroupedFluidInvView.FluidInvStatistic Statistics associated with a singleFluidFilter
in a given inventory.LbaFluidsConfig Stores various options for LBA-fluids.SingleFluidTank A delegating accessor of a single slot in aFixedFluidInv
.SingleFluidTankView A delegating view of a single slot in aFixedFluidInvView
. -
Enum Summary Enum Description FluidVolumeUtil.ItemContainerStatus