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
ConstructorsConstructorDescriptionEnergyNetwork(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<Long, Boolean> component) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUpdate(INetworkElement element) If the given element can update.intlongvoidonSkipUpdate(INetworkElement element) When the given element is not being updated becauseIFullNetworkListener.canUpdate(INetworkElement)returned false.voidpostUpdate(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, getChannel, getChannelExternal, getChannelIndex, 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, updateGuaranteedMethods inherited from class org.cyclops.integrateddynamics.core.network.PositionedAddonsNetwork
disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPrioritizedPositions, getPrioritizedPositions, hasPositions, invalidateIterators, isPositionDisabled, removePosition, setPartPosIteratorHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable
addObserver, getChannelIndex, isObservationForcedPending, removeObserver, runObserverSync, scheduleObservation, scheduleObservationForced, shouldObserveMethods inherited from interface org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetwork
addPosition, disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPositions, getPositions, getPrioritizedPositions, getPrioritizedPositions, hasPositions, isPositionDisabled, removePosition, setPartPosIteratorHandlerMethods inherited from interface org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients
getChannel, getChannelExternal, getChannelSlotted, getComponent, getLastSecondDurationIndex, getPositionedStorage, getPositionedStorageFilter, getPositionedStorageUnsafe, getRawInstances, resetLastSecondDurationsIndex, setPositionedStorageFilter
-
Constructor Details
-
EnergyNetwork
-
-
Method Details
-
canUpdate
Description copied from interface:IFullNetworkListenerIf the given element can update.- Specified by:
canUpdatein interfaceIFullNetworkListener- Overrides:
canUpdatein classPositionedAddonsNetworkIngredients<Long,Boolean> - Parameters:
element- The network element.- Returns:
- If it can update.
-
onSkipUpdate
Description copied from interface:IFullNetworkListenerWhen the given element is not being updated becauseIFullNetworkListener.canUpdate(INetworkElement)returned false.- Specified by:
onSkipUpdatein interfaceIFullNetworkListener- Overrides:
onSkipUpdatein classPositionedAddonsNetworkIngredients<Long,Boolean> - Parameters:
element- The element that is not being updated.
-
postUpdate
Description copied from interface:IFullNetworkListenerCalled after a network element's update was called.- Specified by:
postUpdatein interfaceIFullNetworkListener- Overrides:
postUpdatein classPositionedAddonsNetworkIngredients<Long,Boolean> - Parameters:
element- The network element.
-
getConsumptionRate
public int getConsumptionRate()- Specified by:
getConsumptionRatein interfaceIEnergyNetwork- Returns:
- The current network consumption rate.
-
getRateLimit
public long getRateLimit()- Specified by:
getRateLimitin interfaceIPositionedAddonsNetworkIngredients<Long,Boolean> - Returns:
- The quantity rate limit for each storage mutation.
-