Package alexiil.mc.lib.attributes.fluid
Class SingleFluidTankView
java.lang.Object
alexiil.mc.lib.attributes.fluid.SingleFluidTankView
- Direct Known Subclasses:
SingleFluidTank
A delegating view of a single slot in a
FixedFluidInvView
.-
Method Summary
Modifier and TypeMethodDescriptionaddListener(FluidInvTankChangeListener listener, ListenerRemovalToken removalToken)
Adds the given listener to the backing inventory, such that theFluidInvTankChangeListener.onChange(FixedFluidInvView, int, FluidVolume, FluidVolume)
will be called every time that this inventory changes.get()
int
getIndex()
int
Deprecated, for removal: This API element is subject to removal in a future version.getSpace()
boolean
-
Method Details
-
getBackingInv
-
getIndex
public final int getIndex() -
get
-
getMaxAmount
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetMaxAmount_F()
. -
getMaxAmount_F
-
getSpace
-
isValid
-
getFilter
-
addListener
public final ListenerToken addListener(FluidInvTankChangeListener listener, ListenerRemovalToken removalToken)Adds the given listener to the backing inventory, such that theFluidInvTankChangeListener.onChange(FixedFluidInvView, int, FluidVolume, FluidVolume)
will be called every time that this inventory changes. However if this inventory doesn't support listeners then this will return a nulltoken
.- Parameters:
removalToken
- A token that will be called whenever the given listener is removed from this inventory (or if this inventory itself is unloaded or otherwise invalidated).- Returns:
- A token that represents the listener, or null if the listener could not be added.
-
getMaxAmount_F()
.