Class SubFixedFluidInvView
java.lang.Object
alexiil.mc.lib.attributes.fluid.impl.AbstractPartialFixedFluidInvView
alexiil.mc.lib.attributes.fluid.impl.SubFixedFluidInvView
- All Implemented Interfaces:
- Convertible,- FixedFluidInvView
- Direct Known Subclasses:
- SubFixedFluidInv
A sub-view of an existing 
FixedFluidInvView.- 
Field SummaryFields inherited from class alexiil.mc.lib.attributes.fluid.impl.AbstractPartialFixedFluidInvViewinv
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddListener(FluidInvTankChangeListener listener, ListenerRemovalToken removalToken)Adds the given listener to this inventory, such that theFluidInvTankChangeListener.onChange(FixedFluidInvView, int, FluidVolume, FluidVolume)will be called every time that this inventory changes.protected intgetInternalTank(int tank)intMethods inherited from class alexiil.mc.lib.attributes.fluid.impl.AbstractPartialFixedFluidInvViewgetFilterForTank, getInvFluid, getMaxAmount, getMaxAmount_F, isFluidValidForTankMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface alexiil.mc.lib.attributes.fluid.FixedFluidInvViewconvertTo, fluidIterable, getGroupedInv, getMappedInv, getSubInv, getTank, offerSelfAsAttribute, tankIterable
- 
Constructor Details- 
SubFixedFluidInvView
 
- 
- 
Method Details- 
getInternalTankprotected int getInternalTank(int tank)- Specified by:
- getInternalTankin class- AbstractPartialFixedFluidInvView
- Returns:
- The tank that the internal AbstractPartialFixedFluidInvView.invshould use.
 
- 
getTankCountpublic int getTankCount()- Returns:
- The number of tanks in this inventory.
 
- 
getFixedView- Returns:
- An object that only implements FixedFluidInvView, and does not expose the modification methods thatFixedFluidInvdoes. Implementations that don't expose any modification methods themselves should override this method to just return themselves.
 
- 
addListenerpublic ListenerToken addListener(FluidInvTankChangeListener listener, ListenerRemovalToken removalToken)Description copied from interface:FixedFluidInvViewAdds the given listener to this 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.- 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.
 
 
-