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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable
IIngredientComponentStorageObservable.Change, IIngredientComponentStorageObservable.IIndexChangeObserver<T,
M>, IIngredientComponentStorageObservable.StorageChangeEvent<T, M> -
Field Summary
Fields inherited from interface org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetwork
DEFAULT_CHANNEL, WILDCARD_CHANNEL
-
Method Summary
Modifier and TypeMethodDescriptiongetChannel
(int channel) Deprecated.default <S> S
getChannelExternal
(net.minecraftforge.common.capabilities.Capability<S> capability, int channel) Get the external storage at the given channel.getChannelInternal
(int channel) Get the storage at the given channel.getChannelSlotted
(int channel) Get the slotted storage at the given channel.Get the last tick duration of the index observer.Get the storage at the given position.Get the storage at the given position.long
getRawInstances
(PartPos pos) Get all instances at the target position.void
Reset the last second duration count.void
Set an ingredient filter for the given storage position.Methods inherited from interface org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable
addObserver, getChannelIndex, isObservationForcedPending, removeObserver, runObserverSync, scheduleObservation, scheduleObservationForced, shouldObserve
Methods inherited from interface org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetwork
addPosition, disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPositions, getPositions, getPrioritizedPositions, getPrioritizedPositions, hasPositions, isPositionDisabled, removePosition, setPartPosIteratorHandler
-
Method Details
-
getComponent
- Specified by:
getComponent
in interfaceIIngredientComponentStorageObservable<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
- Parameters:
pos
- A position.- Returns:
- An optional ingredient filter for the given storage position.
-
getRawInstances
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
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
Get the last tick duration of the index observer.- Returns:
- Duration in nanoseconds
-
resetLastSecondDurationsIndex
void resetLastSecondDurationsIndex()Reset the last second duration count.
-