Interface IPartTypeActiveVariable<P extends IPartTypeActiveVariable<P,S>,S extends IPartState<P>>
- All Superinterfaces:
INetworkEventListener<IPartNetworkElement<P,
,S>> IPartType<P,
S>
- All Known Subinterfaces:
IPartTypeWriter<P,
S>
- All Known Implementing Classes:
PartTypeAudioWriter
,PartTypeEffectWriter
,PartTypeEntityWriter
,PartTypeInventoryWriter
,PartTypeMachineWriter
,PartTypePanelDisplay
,PartTypePanelLightDynamic
,PartTypePanelVariableDriven
,PartTypeRedstoneWriter
,PartTypeWriteBase
public interface IPartTypeActiveVariable<P extends IPartTypeActiveVariable<P,S>,S extends IPartState<P>>
extends IPartType<P,S>
A part type that can have an active variable.
-
Method Summary
Modifier and TypeMethodDescriptiongetActiveVariable
(INetwork network, IPartNetwork partNetwork, PartTarget target, S partState) Get the variable that is currently active for this part, the value in this variable will be used to write something.boolean
hasActiveVariable
(IPartNetwork network, PartTarget target, S partState) Methods inherited from interface org.cyclops.integrateddynamics.api.network.INetworkEventListener
getSubscribedEvents, hasEventSubscriptions, onEvent
Methods inherited from interface org.cyclops.integrateddynamics.api.part.IPartType
addDrops, afterNetworkAlive, afterNetworkReAlive, beforeNetworkKill, createNetworkElement, defaultBlockState, forceLightTransparency, fromNBT, getBaseBlockState, getBlockModelPath, getBlockState, getChannel, getCloneItemStack, getConsumptionRate, getContainerProvider, getContainerProviderOffsets, getContainerProviderSettings, getItem, getItemStack, getMinimumUpdateInterval, getPartRenderPosition, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUniqueName, getUpdateInterval, isEnabled, isSolid, isUpdate, loadTooltip, loadTooltip, onBlockNeighborChange, onNetworkAddition, onNetworkRemoval, onOffsetVariablesChanged, onPartActivated, onPostRemoved, onPreRemoved, postUpdate, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, supportsOffsets, toNBT, update, updateTick, writeExtraGuiData, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Method Details
-
hasActiveVariable
- Parameters:
network
- The network this part belongs to.target
- The target block.partState
- The state of this part.- Returns:
- If there is an active variable present.
-
getActiveVariable
<V extends IValue> IVariable<V> getActiveVariable(INetwork network, IPartNetwork partNetwork, PartTarget target, S partState) Get the variable that is currently active for this part, the value in this variable will be used to write something.- Type Parameters:
V
- The value type.- Parameters:
network
- The network this part belongs to.partNetwork
- The part network this part belongs to.target
- The target block.partState
- The state of this part.- Returns:
- The variable reference to some other value that needs to be written by this part.
-