Class IngredientComponentStorageSlottedInsertProxy<T,M>

java.lang.Object
org.cyclops.integratedcrafting.ingredient.storage.IngredientComponentStorageSlottedInsertProxy<T,M>
All Implemented Interfaces:
Iterable<T>, org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>, org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>

public class IngredientComponentStorageSlottedInsertProxy<T,M> extends Object implements org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
An ingredient component storage that only accepts insertions, and immediately forwards all insertions to another storage. Externally, this storage is exposed as inventory with a single empty slot.
  • Constructor Details

    • IngredientComponentStorageSlottedInsertProxy

      public IngredientComponentStorageSlottedInsertProxy(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M> storage)
  • Method Details

    • getSlots

      public int getSlots()
      Specified by:
      getSlots in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
    • getSlotContents

      public T getSlotContents(int slot)
      Specified by:
      getSlotContents in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
    • getMaxQuantity

      public long getMaxQuantity(int slot)
      Specified by:
      getMaxQuantity in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
    • insert

      public T insert(int slot, @Nonnull T instance, boolean simulate)
      Specified by:
      insert in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
    • extract

      public T extract(int slot, long quantity, boolean simulate)
      Specified by:
      extract in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
    • getComponent

      public org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> getComponent()
      Specified by:
      getComponent in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
      Specified by:
      iterator in interface Iterable<T>
    • iterator

      public Iterator<T> iterator(@Nonnull T instance, M matchCondition)
      Specified by:
      iterator in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
    • getMaxQuantity

      public long getMaxQuantity()
      Specified by:
      getMaxQuantity in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
    • insert

      public T insert(@Nonnull T instance, boolean simulate)
      Specified by:
      insert in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
    • extract

      public T extract(@Nonnull T instance, M matchCondition, boolean simulate)
      Specified by:
      extract in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>
    • extract

      public T extract(long quantity, boolean simulate)
      Specified by:
      extract in interface org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T,M>