Interface IPositionedAddonsNetworkIngredients<T,M>

Type Parameters:
T - The instance type.
M - The matching condition parameter, may be Void. Instances MUST properly implement the equals method.
All Superinterfaces:
IIngredientComponentStorageObservable<T,M>, IPositionedAddonsNetwork
All Known Subinterfaces:
IEnergyNetwork
All Known Implementing Classes:
EnergyNetwork, PositionedAddonsNetworkIngredients

public interface IPositionedAddonsNetworkIngredients<T,M> extends IPositionedAddonsNetwork, IIngredientComponentStorageObservable<T,M>
An ingredient network that can hold prioritized positions.
  • Method Details

    • getComponent

      org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> getComponent()
      Specified by:
      getComponent in interface IIngredientComponentStorageObservable<T,M>
      Returns:
      The ingredient component type this storage applies to.
    • getRateLimit

      long getRateLimit()
      Returns:
      The quantity rate limit for each storage mutation.
    • getPositionedStorage

      org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M> getPositionedStorage(PartPos pos)
      Get the storage at the given position.
      Parameters:
      pos - A position.
      Returns:
      The storage, or an empty storage if none is available.
    • setPositionedStorageFilter

      void setPositionedStorageFilter(PartPos pos, @Nullable PositionedAddonsNetworkIngredientsFilter<T> filter)
      Set an ingredient filter for the given storage position. Unsets the filter if null is provided.
      Parameters:
      pos - A position.
      filter - An ingredient filter.
    • getPositionedStorageFilter

      @Nullable PositionedAddonsNetworkIngredientsFilter<T> getPositionedStorageFilter(PartPos pos)
      Parameters:
      pos - A position.
      Returns:
      An optional ingredient filter for the given storage position.
    • getRawInstances

      default Iterator<T> getRawInstances(PartPos pos)
      Get all instances at the target position.
      Parameters:
      pos - A part position.
      Returns:
      A collection of instances. This can not be a view, and must be a deep copy of the target.
    • getPositionedStorageUnsafe

      @Nullable default org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M> getPositionedStorageUnsafe(PartPos pos)
      Get the storage at the given position.
      Parameters:
      pos - A position.
      Returns:
      The storage.
    • getChannelInternal

      INetworkIngredientsChannel<T,M> getChannelInternal(int channel)
      Get the storage at the given channel.
      Parameters:
      channel - A channel id.
      Returns:
      A storage.
    • getChannel

      @Deprecated default org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M> getChannel(int channel)
      Deprecated.
      Get the storage at the given channel.
      Parameters:
      channel - A channel id.
      Returns:
      A storage.
    • getChannelSlotted

      org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M> getChannelSlotted(int channel)
      Get the slotted storage at the given channel.
      Parameters:
      channel - A channel id.
      Returns:
      A slotted storage.
    • getChannelExternal

      @Nullable default <S> S getChannelExternal(net.minecraftforge.common.capabilities.Capability<S> capability, int channel)
      Get the external storage at the given channel.
      Type Parameters:
      S - The external storage type.
      Parameters:
      capability - A capability to wrap the channel in.
      channel - A channel id.
      Returns:
      An external storage, or null if no wrapping is possible for the given capability.
    • getLastSecondDurationIndex

      Map<PartPos,Long> getLastSecondDurationIndex()
      Get the last tick duration of the index observer.
      Returns:
      Duration in nanoseconds
    • resetLastSecondDurationsIndex

      void resetLastSecondDurationsIndex()
      Reset the last second duration count.