Package alexiil.mc.lib.attributes.fluid
Class SingleFluidTankView
java.lang.Object
alexiil.mc.lib.attributes.fluid.SingleFluidTankView
- Direct Known Subclasses:
 SingleFluidTank
public class SingleFluidTankView
extends java.lang.Object
A delegating view of a single slot in a 
FixedFluidInvView.- 
Method Summary
Modifier and Type Method Description ListenerTokenaddListener(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.FluidVolumeget()FixedFluidInvViewgetBackingInv()FluidFiltergetFilter()intgetIndex()intgetMaxAmount()Deprecated.Replaced bygetMaxAmount_F().FluidAmountgetMaxAmount_F()FluidAmountgetSpace()booleanisValid(FluidKey fluid) 
- 
Method Details
- 
getBackingInv
 - 
getIndex
public final int getIndex() - 
get
 - 
getMaxAmount
@Deprecated public final int getMaxAmount()Deprecated.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.
 
 
 -