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 IIngredientComponentStorageObservable
IIngredientComponentStorageObservable.Change, IIngredientComponentStorageObservable.IIndexChangeObserver<T,M>, IIngredientComponentStorageObservable.StorageChangeEvent<T, M> -
Field Summary
Fields inherited from interface 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.voidsetNetwork(INetwork network) Methods inherited from class PositionedAddonsNetworkIngredients
addNetworkElement, addObserver, addPosition, afterServerLoad, applyChangesToChannel, beforeServerStop, getChannel, getChannelExternal, getChannelIndex, getChannelSlotted, getComponent, getIndexSafe, getInsertPreConsumers, getInstanceLocationsIndex, getLastSecondDurationIndex, getPositionedStorage, getPositionedStorageFilter, invalidateElement, isObservationForcedPending, kill, onChange, onPositionAdded, onPositionRemoved, registerInsertPreConsumer, removeNetworkElementPost, removeNetworkElementPre, removeObserver, removePathElement, resetLastSecondDurationsIndex, revalidateElement, runObserverSync, scheduleObservation, scheduleObservationForced, setPositionedStorageFilter, shouldObserve, unregisterInsertPreConsumer, update, updateGuaranteedMethods inherited from class PositionedAddonsNetwork
disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPrioritizedPositions, getPrioritizedPositions, hasPositions, invalidateIterators, isPositionDisabled, removePosition, setPartPosIteratorHandlerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IIngredientComponentStorageObservable
addObserver, getChannelIndex, isObservationForcedPending, removeObserver, runObserverSync, scheduleObservation, scheduleObservationForced, shouldObserveMethods inherited from interface IPositionedAddonsNetwork
addPosition, disablePosition, enablePosition, getChannels, getPartPosIteratorHandler, getPositionChannel, getPositions, getPositions, getPrioritizedPositions, getPrioritizedPositions, hasPositions, isPositionDisabled, removePosition, setPartPosIteratorHandlerMethods inherited from interface IPositionedAddonsNetworkIngredients
getChannel, getChannelExternal, getChannelSlotted, getComponent, getInsertPreConsumers, getLastSecondDurationIndex, getPositionedStorage, getPositionedStorageFilter, getPositionedStorageUnsafe, getRawInstances, registerInsertPreConsumer, resetLastSecondDurationsIndex, setPositionedStorageFilter, unregisterInsertPreConsumer
-
Constructor Details
-
EnergyNetwork
-
-
Method Details
-
getNetwork
- Overrides:
getNetworkin classPositionedAddonsNetwork
-
setNetwork
- Overrides:
setNetworkin classPositionedAddonsNetwork
-
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.
-