Class IngredientChannelAdapterWrapperSlotted<T,M>
java.lang.Object
org.cyclops.integrateddynamics.core.network.IngredientChannelAdapterWrapperSlotted<T,M>
- Type Parameters:
T- The instance type.M- The matching condition parameter.
- 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 IngredientChannelAdapterWrapperSlotted<T,M>
extends Object
implements org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorageSlotted<T,M>
A slotted wrapper over
IngredientChannelAdapter.
It exposes slots by chaining storages sequentially, not using the index.-
Constructor Summary
ConstructorsConstructorDescriptionIngredientChannelAdapterWrapperSlotted(IngredientChannelAdapter<T, M> channel, it.unimi.dsi.fastutil.ints.Int2IntMap cacheChannelSlots) -
Method Summary
Modifier and TypeMethodDescriptionextract(int slotAbsolute, long maxQuantity, boolean simulate) extract(long maxQuantity, boolean simulate) protected static intgetIngredientComponentStorageSize(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<?, ?> storage) longlonggetMaxQuantity(int slotAbsolute) getSlotContents(int slotAbsolute) intgetSlots()protected org.apache.commons.lang3.tuple.Triple<org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<T, M>, Integer, PartPos> getStorageAndRelativeSlot(int slot) iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IngredientChannelAdapterWrapperSlotted
public IngredientChannelAdapterWrapperSlotted(IngredientChannelAdapter<T, M> channel, it.unimi.dsi.fastutil.ints.Int2IntMap cacheChannelSlots)
-
-
Method Details
-
getIngredientComponentStorageSize
protected static int getIngredientComponentStorageSize(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<?, ?> storage) -
getSlots
public int getSlots() -
getStorageAndRelativeSlot
-
getSlotContents
-
getMaxQuantity
public long getMaxQuantity(int slotAbsolute) -
insert
-
extract
-
getComponent
-
iterator
-
iterator
-
getMaxQuantity
public long getMaxQuantity() -
insert
-
extract
-
extract
-