Interface IIngredientComponentStorageObservable<T,M> 
- Type Parameters:
- T- The instance type.
- M- The matching condition parameter, may be Void. Instances MUST properly implement the equals method.
- All Known Subinterfaces:
- IEnergyNetwork,- IPositionedAddonsNetworkIngredients<T,- M> 
- All Known Implementing Classes:
- EnergyNetwork,- PositionedAddonsNetworkIngredients
public interface IIngredientComponentStorageObservable<T,M> 
An observable ingredient component storage.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumA type of change.static interfaceAn observer for listening to storage changes.static classA storage change event.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd an observer for listing to index change events.getChannelIndex(int channel) Get the last indexed storage at the given channel.booleanisObservationForcedPending(int channel) voidRemove the given index change observer.voidManually run observer synchronously (even if async is allowed), if it should observe.voidIndicate that this network should observe starting somewhere in the future.voidscheduleObservationForced(int channel, PartPos pos) Indicate that this network should observe starting in the next tick.boolean
- 
Method Details- 
getComponent- Returns:
- The ingredient component type this storage applies to.
 
- 
addObserverAdd an observer for listing to index change events.- Parameters:
- observer- An index change observer.
 
- 
removeObserverRemove the given index change observer. This will silently fail if the given observer was not registered.- Parameters:
- observer- An index change observer.
 
- 
scheduleObservationvoid scheduleObservation()Indicate that this network should observe starting somewhere in the future. This should be called when observer diffs are needed, but are not urgent. This is a more efficient variant ofscheduleObservationForced(int, PartPos). This should be called each time that observations are needed, as this observable will reset the internal flag after each observation.
- 
scheduleObservationForcedIndicate that this network should observe starting in the next tick. This is a stricter variant ofscheduleObservation(), and can only be done for a single position and channel. This should be called when observer diffs are needed in the next tick for the given position.- Parameters:
- channel- The channel to force an observation in.
- pos- The position to force an observation for.
 
- 
shouldObserveboolean shouldObserve()- Returns:
- If an observation should happen.
 
- 
isObservationForcedPendingboolean isObservationForcedPending(int channel) - Parameters:
- channel- The channel to check for a forced observation in.
- Returns:
- If the given channel contains a forced observation scheduling that has not been processed yet.
 
- 
runObserverSyncvoid runObserverSync()Manually run observer synchronously (even if async is allowed), if it should observe.
- 
getChannelIndexGet the last indexed storage at the given channel.- Parameters:
- channel- A channel id.
- Returns:
- A channel index.
 
 
-