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
Nested ClassesModifier and TypeClassDescriptionstatic classPartTypeConnector.State<P extends PartTypeConnector>Nested classes/interfaces inherited from class PartTypeBase
PartTypeBase.IEventAction<P,S, E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterNetworkReAlive(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.BlockcreateBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon<?> blockConfig, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) Factory method for creating a block instance.booleanvoidonNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Called when this element is added to the network.booleanMethods inherited from class PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlock, getBlockModelPath, getBlockState, getItem, getMod, getModId, getPartRenderPosition, getSubscribedEvents, getUniqueName, hasEventSubscriptions, loadTooltip, loadTooltip, onEvent, onPartActivated, registerBlock, writeExtraGuiDataMethods inherited from class PartTypeAdapter
afterNetworkAlive, beforeNetworkKill, constructDefaultState, defaultBlockState, deserializeState, getChannel, getCloneItemStack, getConsumptionRate, getItemStack, getMinimumUpdateInterval, getPriority, getState, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, onBlockNeighborChange, onNetworkRemoval, onOffsetVariablesChanged, onPostRemoved, onPreRemoved, postUpdate, serializeState, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, update, updateTickMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IPartType
getContainerProvider, getContainerProviderOffsets, getContainerProviderSettings, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Constructor Details
-
PartTypeConnector
-
-
Method Details
-
supportsOffsets
public boolean supportsOffsets()- Returns:
- If this part can handle custom offsets.
-
isUpdate
- Specified by:
isUpdatein interfaceIPartType<P extends PartTypeConnector<P,S>, S extends PartTypeConnector.State<P>> - Overrides:
isUpdatein classPartTypeAdapter<P extends PartTypeConnector<P,S>, S extends PartTypeConnector.State<P>> - Parameters:
state- The state- Returns:
- If this element should be updated. This method is only called once during network initialization.
-
createBlock
protected net.minecraft.world.level.block.Block createBlock(org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon<?> blockConfig, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) Description copied from class:PartTypeBaseFactory method for creating a block instance.- Overrides:
createBlockin classPartTypeBase<P extends PartTypeConnector<P,S>, S extends PartTypeConnector.State<P>> - Parameters:
blockConfig- The config to register the block for.properties-- Returns:
- The block instance.
-
afterNetworkReAlive
public void afterNetworkReAlive(INetwork network, IPartNetwork partNetwork, PartTarget target, S state) Description copied from interface:IPartTypeCalled right after this network has come alive again, for example after a network restart.- Specified by:
afterNetworkReAlivein interfaceIPartType<P extends PartTypeConnector<P,S>, S extends PartTypeConnector.State<P>> - Overrides:
afterNetworkReAlivein 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:IPartTypeCalled when this element is added to the network.- Specified by:
onNetworkAdditionin interfaceIPartType<P extends PartTypeConnector<P,S>, S extends PartTypeConnector.State<P>> - Overrides:
onNetworkAdditionin 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
-