Class EnergyNetwork
java.lang.Object
org.cyclops.integrateddynamics.core.network.PositionedAddonsNetwork
org.cyclops.integrateddynamics.core.network.PositionedAddonsNetworkIngredients<Long,Boolean>
org.cyclops.integrateddynamics.core.network.EnergyNetwork
- All Implemented Interfaces:
IIngredientComponentStorageObservable<Long,
,Boolean> IIngredientComponentStorageObservable.IIndexChangeObserver<Long,
,Boolean> IEnergyNetwork
,IFullNetworkListener
,IPositionedAddonsNetwork
,IPositionedAddonsNetworkIngredients<Long,
Boolean>
public class EnergyNetwork
extends PositionedAddonsNetworkIngredients<Long,Boolean>
implements IEnergyNetwork
A network that can hold energy.
-
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
-
Constructor Summary
ConstructorDescriptionEnergyNetwork
(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<Long, Boolean> component) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUpdate
(INetworkElement element) If the given element can update.int
long
void
onSkipUpdate
(INetworkElement element) When the given element is not being updated becauseIFullNetworkListener.canUpdate(INetworkElement)
returned false.void
postUpdate
(INetworkElement element) Called after a network element's update was called.Methods inherited from class org.cyclops.integrateddynamics.core.network.PositionedAddonsNetworkIngredients
addNetworkElement, addObserver, addPosition, afterServerLoad, applyChangesToChannel, beforeServerStop, getChannelExternal, getChannelIndex, getChannelInternal, getChannelSlotted, getComponent, getIndexSafe, getInstanceLocationsIndex, getLastSecondDurationIndex, getPositionedStorage, getPositionedStorageFilter, invalidateElement, isObservationForcedPending, kill, onChange, onPositionAdded, onPositionRemoved, removeNetworkElementPost, removeNetworkElementPre, removeObserver, removePathElement, resetLastSecondDurationsIndex, revalidateElement, runObserverSync, scheduleObservation, scheduleObservationForced, setPositionedStorageFilter, shouldObserve, update, updateGuaranteed
Methods inherited from class org.cyclops.integrateddynamics.core.network.PositionedAddonsNetwork
disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPrioritizedPositions, getPrioritizedPositions, hasPositions, invalidateIterators, isPositionDisabled, removePosition, setPartPosIteratorHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
Methods inherited from interface org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients
getChannel, getChannelExternal, getChannelInternal, getChannelSlotted, getComponent, getLastSecondDurationIndex, getPositionedStorage, getPositionedStorageFilter, getPositionedStorageUnsafe, getRawInstances, resetLastSecondDurationsIndex, setPositionedStorageFilter
-
Constructor Details
-
EnergyNetwork
-
-
Method Details
-
canUpdate
Description copied from interface:IFullNetworkListener
If the given element can update.- Specified by:
canUpdate
in interfaceIFullNetworkListener
- Overrides:
canUpdate
in classPositionedAddonsNetworkIngredients<Long,
Boolean> - Parameters:
element
- The network element.- Returns:
- If it can update.
-
onSkipUpdate
Description copied from interface:IFullNetworkListener
When the given element is not being updated becauseIFullNetworkListener.canUpdate(INetworkElement)
returned false.- Specified by:
onSkipUpdate
in interfaceIFullNetworkListener
- Overrides:
onSkipUpdate
in classPositionedAddonsNetworkIngredients<Long,
Boolean> - Parameters:
element
- The element that is not being updated.
-
postUpdate
Description copied from interface:IFullNetworkListener
Called after a network element's update was called.- Specified by:
postUpdate
in interfaceIFullNetworkListener
- Overrides:
postUpdate
in classPositionedAddonsNetworkIngredients<Long,
Boolean> - Parameters:
element
- The network element.
-
getConsumptionRate
public int getConsumptionRate()- Specified by:
getConsumptionRate
in interfaceIEnergyNetwork
- Returns:
- The current network consumption rate.
-
getRateLimit
public long getRateLimit()- Specified by:
getRateLimit
in interfaceIPositionedAddonsNetworkIngredients<Long,
Boolean> - Returns:
- The quantity rate limit for each storage mutation.
-