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 Classes Modifier and Type Interface Description static class
GroupedFluidInvView.FluidInvStatistic
Statistics associated with a singleFluidFilter
in a given inventory. -
Method Summary
-
Method Details
-
getStoredFluids
java.util.Set<FluidKey> getStoredFluids()- Returns:
- a set containing all of the
FluidKey
's that are stored in the inventory.
-
getAmount
Deprecated.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.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 default int getTotalCapacity()Deprecated.Replaced bygetTotalCapacity_F()
- Returns:
- The total capacity for every
FluidKey
that 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
FluidKey
that can be stored in this inventory.NOTE: This value might not be equal to the sum of
getCapacity(FluidKey)
overgetStoredFluids()
!
-
getSpace
Deprecated.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
- TheFluidKey
to check for.- Returns:
- Statistics about the currently stored amount, capacity, and space for everything that matches the given item stack.
-
getAmount
Deprecated.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 default ListenerToken addListener(FluidInvAmountChangeListener listener, ListenerRemovalToken removalToken)Deprecated.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
.
-