Interface IIngredientComponentStorageHandler

All Known Implementing Classes:
DefaultIngredientComponentStorageHandler

public interface IIngredientComponentStorageHandler
A capability that can hold ingredient component storages. A capability separate from IIngredientComponentStorage is needed because multiple storages could be exposed by a single capability provider.
  • Method Details

    • getComponents

      Collection<IngredientComponent<?,?>> getComponents()
      Returns:
      The ingredient component types this handler holds.
    • getStorage

      @Nullable <T, M> IIngredientComponentStorage<T,M> getStorage(IngredientComponent<T,M> ingredientComponent)
      Get the storage for the given ingredient component,
      Type Parameters:
      T - The instance type.
      M - The matching condition parameter, may be Void. Instances MUST properly implement the equals method.
      Parameters:
      ingredientComponent - The ingredient component.
      Returns:
      The ingredient component storage, or null if it is not available.