Class PartTypeConnector<P extends PartTypeConnector<P,S>,S extends PartTypeConnector.State<P>>
java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTypeAdapter<P,S>
org.cyclops.integrateddynamics.core.part.PartTypeBase<P,S>
org.cyclops.integrateddynamics.part.PartTypeConnector<P,S>
- All Implemented Interfaces:
INetworkEventListener<IPartNetworkElement<P,
,S>> IPartType<P,
S>
- Direct Known Subclasses:
PartTypeConnectorMonoDirectional
,PartTypeConnectorOmniDirectional
public abstract class PartTypeConnector<P extends PartTypeConnector<P,S>,S extends PartTypeConnector.State<P>>
extends PartTypeBase<P,S>
A base wireless connector part.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
PartTypeConnector.State<P extends PartTypeConnector>
Nested classes/interfaces inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
PartTypeBase.IEventAction<P extends IPartType<P,
S>, S extends IPartState<P>, E extends INetworkEvent> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterNetworkReAlive
(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Called right after this network has come alive again, for example after a network restart.protected net.minecraft.world.level.block.Block
createBlock
(org.cyclops.cyclopscore.config.extendedconfig.BlockConfig blockConfig) Factory method for creating a block instance.void
onNetworkAddition
(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Called when this element is added to the network.boolean
Methods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getBlockState, getMod, getSubscribedEvents, getUniqueName, hasEventSubscriptions, loadTooltip, loadTooltip, onEvent, onPartActivated, registerBlock, writeExtraGuiData
Methods inherited from class org.cyclops.integrateddynamics.api.part.PartTypeAdapter
afterNetworkAlive, beforeNetworkKill, constructDefaultState, defaultBlockState, fromNBT, getChannel, getCloneItemStack, getConsumptionRate, getItemStack, getMinimumUpdateInterval, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, isUpdate, onBlockNeighborChange, onNetworkRemoval, onOffsetVariablesChanged, onPostRemoved, onPreRemoved, postUpdate, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, toNBT, update, updateTick
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.part.IPartType
getContainerProvider, getContainerProviderOffsets, getContainerProviderSettings, getItem, getPartRenderPosition, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Constructor Details
-
PartTypeConnector
-
-
Method Details
-
supportsOffsets
public boolean supportsOffsets()- Returns:
- If this part can handle custom offsets.
-
createBlock
protected net.minecraft.world.level.block.Block createBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfig blockConfig) Description copied from class:PartTypeBase
Factory method for creating a block instance.- Overrides:
createBlock
in classPartTypeBase<P extends PartTypeConnector<P,
S>, S extends PartTypeConnector.State<P>> - Parameters:
blockConfig
- The config to register the block for.- Returns:
- The block instance.
-
afterNetworkReAlive
public void afterNetworkReAlive(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Description copied from interface:IPartType
Called right after this network has come alive again, for example after a network restart.- Specified by:
afterNetworkReAlive
in interfaceIPartType<P extends PartTypeConnector<P,
S>, S extends PartTypeConnector.State<P>> - Overrides:
afterNetworkReAlive
in classPartTypeAdapter<P extends PartTypeConnector<P,
S>, S extends PartTypeConnector.State<P>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The state
-
onNetworkAddition
public void onNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Description copied from interface:IPartType
Called when this element is added to the network.- Specified by:
onNetworkAddition
in interfaceIPartType<P extends PartTypeConnector<P,
S>, S extends PartTypeConnector.State<P>> - Overrides:
onNetworkAddition
in classPartTypeAdapter<P extends PartTypeConnector<P,
S>, S extends PartTypeConnector.State<P>> - Parameters:
network
- The network to update in.partNetwork
- The part network to update in.target
- The target block.state
- The state
-