Class ConsumingNetworkElementBase
java.lang.Object
org.cyclops.integrateddynamics.core.network.NetworkElementBase
org.cyclops.integrateddynamics.core.network.ConsumingNetworkElementBase
- All Implemented Interfaces:
Comparable<INetworkElement>, IEnergyConsumingNetworkElement, INetworkElement
- Direct Known Subclasses:
TileNetworkElement
public abstract class ConsumingNetworkElementBase
extends NetworkElementBase
implements IEnergyConsumingNetworkElement
Base implementation for an energy consuming network element.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanisUpdate()voidpostUpdate(INetwork network, boolean updated) Called after the element was updated or not.Methods inherited from class NetworkElementBase
addDrops, afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, canRevalidatePositioned, getUpdateInterval, invalidate, onNeighborBlockChange, onNetworkAddition, onNetworkRemoval, onPostRemoved, onPreRemoved, revalidate, revalidatePositioned, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparable
compareToMethods inherited from interface INetworkElement
addDrops, afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, canRevalidate, getChannel, getPriority, getUpdateInterval, invalidate, isLoaded, onNeighborBlockChange, onNetworkAddition, onNetworkRemoval, onPostRemoved, onPreRemoved, revalidate, setPriorityAndChannel, update
-
Constructor Details
-
ConsumingNetworkElementBase
public ConsumingNetworkElementBase()
-
-
Method Details
-
isUpdate
public boolean isUpdate()- Specified by:
isUpdatein interfaceINetworkElement- Overrides:
isUpdatein classNetworkElementBase- Returns:
- If this element should be updated. This method is only called once during network initialization.
-
getConsumptionRate
public int getConsumptionRate()- Specified by:
getConsumptionRatein interfaceIEnergyConsumingNetworkElement- Returns:
- The energy consumption rate of this part for the given state.
-
postUpdate
Description copied from interface:IEnergyConsumingNetworkElementCalled after the element was updated or not. If the update was not called, this can be because the network did not contain enough energy to let this element work.- Specified by:
postUpdatein interfaceIEnergyConsumingNetworkElement- Parameters:
network- The network.updated- If theINetworkElement.update(INetwork)was called.
-