Package alexiil.mc.lib.attributes.fluid
Interface GroupedFluidInvView
- All Known Subinterfaces:
GroupedFluidInv,LimitedGroupedFluidInv
- All Known Implementing Classes:
CombinedGroupedFluidInv,CombinedGroupedFluidInvView,DelegatingGroupedFluidInv,EmptyGroupedFluidInv,GroupedFluidInvFixedWrapper,GroupedFluidInvViewFixedWrapper,ItemBasedSingleFluidInv,SimpleLimitedGroupedFluidInv
public interface GroupedFluidInvView
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classStatistics associated with a singleFluidFilterin a given inventory. -
Method Summary
Modifier and TypeMethodDescriptiondefault ListenerTokenaddListener(FluidInvAmountChangeListener listener, ListenerRemovalToken removalToken) Deprecated, for removal: This API element is subject to removal in a future version.default ListenerTokenaddListener_F(FluidInvAmountChangeListener_F listener, ListenerRemovalToken removalToken) Adds the given listener to this inventory, such that theFluidInvAmountChangeListener.onChange(GroupedFluidInvView, FluidKey, int, int)will be called every time that this inventory changes.default intgetAmount(FluidFilter filter) Deprecated, for removal: This API element is subject to removal in a future version.default intDeprecated, for removal: This API element is subject to removal in a future version.Replaced bygetAmount_F(FluidKey)default FluidAmountgetAmount_F(FluidFilter filter) default FluidAmountgetAmount_F(FluidKey fluid) default intgetCapacity(FluidKey fluid) Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetCapacity_F(FluidKey)default FluidAmountgetCapacity_F(FluidKey fluid) default GroupedFluidInvViewdefault intDeprecated, for removal: This API element is subject to removal in a future version.Replaced bygetSpace_F(FluidKey)default FluidAmountgetSpace_F(FluidKey fluid) getStatistics(FluidFilter filter) getStatistics(FluidKey filter) default intDeprecated, for removal: This API element is subject to removal in a future version.Replaced bygetTotalCapacity_F()default FluidAmountstatic void
-
Method Details
-
getStoredFluids
- Returns:
- a set containing all of the
FluidKey's that are stored in the inventory.
-
getAmount
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetAmount_F(FluidKey)- Parameters:
fluid- The stack to check for. Must not beempty.- Returns:
- The total amount of the given stack that is stored in this inventory.
-
getAmount_F
- Parameters:
fluid- The stack to check for. Must not beempty.- Returns:
- The total amount of the given stack that is stored in this inventory.
-
getCapacity
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetCapacity_F(FluidKey)- Parameters:
fluid- The fluid to check for. Cannot be the empty fluid.- Returns:
- The total space that is available (right now!) to store the given stack.
-
getCapacity_F
- Parameters:
fluid- The fluid to check for. Cannot be the empty fluid.- Returns:
- The total space that is available (right now!) to store the given stack.
-
getTotalCapacity
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetTotalCapacity_F()- Returns:
- The total capacity for every
FluidKeythat can be stored in this inventory.NOTE: This value might not be equal to the sum of
getCapacity(FluidKey)overgetStoredFluids()!
-
getTotalCapacity_F
- Returns:
- The total capacity for every
FluidKeythat can be stored in this inventory.NOTE: This value might not be equal to the sum of
getCapacity(FluidKey)overgetStoredFluids()!
-
getSpace
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetSpace_F(FluidKey)- Returns:
- The total space that could store the given stack, not including space that is currently taken up by the
stack (so this should change with
getAmount(FluidKey)).
-
getSpace_F
- Returns:
- The total space that could store the given stack, not including space that is currently taken up by the
stack (so this should change with
getAmount(FluidKey)).
-
getStatistics
- Parameters:
filter- The filter to check on.- Returns:
- Statistics about the currently stored amount, capacity, and space for everything that matches the given filter.
-
getStatistics
- Parameters:
filter- TheFluidKeyto check for.- Returns:
- Statistics about the currently stored amount, capacity, and space for everything that matches the given item stack.
-
getAmount
Deprecated, for removal: This API element is subject to removal in a future version.Replaced bygetAmount_F(FluidFilter)- Returns:
- A count of all the
FluidKey's that match the given filter.
-
getAmount_F
- Returns:
- A count of all the
FluidKey's that match the given filter.
-
addListener
@Deprecated(since="0.6.0", forRemoval=true) default ListenerToken addListener(FluidInvAmountChangeListener listener, ListenerRemovalToken removalToken) Deprecated, for removal: This API element is subject to removal in a future version.Adds the given listener to this inventory, such that theFluidInvAmountChangeListener.onChange(GroupedFluidInvView, FluidKey, int, int)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.
-
addListener_F
default ListenerToken addListener_F(FluidInvAmountChangeListener_F listener, ListenerRemovalToken removalToken) Adds the given listener to this inventory, such that theFluidInvAmountChangeListener.onChange(GroupedFluidInvView, FluidKey, int, int)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.
-
validateGroupedFluidInvView
-
getGroupedView
- Returns:
- A completely unmodifiable view of this
GroupedItemInvView.
-
getAmount_F(FluidFilter)