Interface GroupedFluidInvView

All Known Subinterfaces:
GroupedFluidInv, LimitedGroupedFluidInv
All Known Implementing Classes:
CombinedGroupedFluidInv, CombinedGroupedFluidInvView, DelegatingGroupedFluidInv, EmptyGroupedFluidInv, GroupedFluidInvFixedWrapper, GroupedFluidInvViewFixedWrapper, ItemBasedSingleFluidInv, SimpleLimitedGroupedFluidInv

public interface GroupedFluidInvView
  • Method Details

    • getStoredFluids

      Set<FluidKey> getStoredFluids()
      Returns:
      a set containing all of the FluidKey's that are stored in the inventory.
    • getAmount

      @Deprecated(since="0.6.0", forRemoval=true) default int getAmount(FluidKey fluid)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fluid - The stack to check for. Must not be empty.
      Returns:
      The total amount of the given stack that is stored in this inventory.
    • getAmount_F

      default FluidAmount getAmount_F(FluidKey fluid)
      Parameters:
      fluid - The stack to check for. Must not be empty.
      Returns:
      The total amount of the given stack that is stored in this inventory.
    • getCapacity

      @Deprecated(since="0.6.0", forRemoval=true) default int getCapacity(FluidKey fluid)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      default FluidAmount getCapacity_F(FluidKey fluid)
      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(since="0.6.0", forRemoval=true) default int getTotalCapacity()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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) over getStoredFluids()!

    • getTotalCapacity_F

      default FluidAmount 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) over getStoredFluids()!

    • getSpace

      @Deprecated(since="0.6.0", forRemoval=true) default int getSpace(FluidKey fluid)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      default FluidAmount getSpace_F(FluidKey fluid)
      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

      default GroupedFluidInvView.FluidInvStatistic getStatistics(FluidKey filter)
      Parameters:
      filter - The FluidKey to check for.
      Returns:
      Statistics about the currently stored amount, capacity, and space for everything that matches the given item stack.
    • getAmount

      @Deprecated(since="0.6.0", forRemoval=true) default int getAmount(FluidFilter filter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A count of all the FluidKey's that match the given filter.
    • getAmount_F

      default FluidAmount getAmount_F(FluidFilter filter)
      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 the FluidInvAmountChangeListener.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 null token.
      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 the FluidInvAmountChangeListener.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 null token.
      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

      static void validateGroupedFluidInvView(GroupedFluidInvView instance)
    • getGroupedView

      default GroupedFluidInvView getGroupedView()
      Returns:
      A completely unmodifiable view of this GroupedItemInvView.