Class PartTypeConnectorOmniDirectional
java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State>
org.cyclops.integrateddynamics.core.part.PartTypeBase<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State>
org.cyclops.integrateddynamics.part.PartTypeConnector<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State>
org.cyclops.integrateddynamics.part.PartTypeConnectorOmniDirectional
- All Implemented Interfaces:
INetworkEventListener<IPartNetworkElement<PartTypeConnectorOmniDirectional,,PartTypeConnectorOmniDirectional.State>> IPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State>
public class PartTypeConnectorOmniDirectional
extends PartTypeConnector<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State>
An omnidirectional wireless connector part that can connect to
all other monodirectional connectors of the same group anywhere in any dimension.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested 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> -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPosition(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) static intnet.minecraft.world.level.block.state.BlockStategetBlockState(IPartContainer partContainer, net.minecraft.core.Direction side) Get the base block state that will be rendered for this part.intnet.minecraft.world.item.ItemStackgetItemStack(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.util.ProblemReporter.PathElement problemPath, PartTypeConnectorOmniDirectional.State state, boolean saveState) Get the itemstack from the given state.getState(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.util.ProblemReporter.PathElement problemPath, net.minecraft.world.item.ItemStack itemStack) Get the part state from the given itemstack.protected IgnoredBlockStatus.StatusvoidloadTooltip(net.minecraft.world.item.ItemStack itemStack, Consumer<net.minecraft.network.chat.Component> tooltipAdder) Add tooltip lines for this aspect when this part's item is being hovered.voidloadTooltip(PartTypeConnectorOmniDirectional.State state, List<net.minecraft.network.chat.Component> lines) Add tooltip lines for this aspect when this part is being hovered by a mod like WAILA.voidonNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Called when this element is added to the network.net.minecraft.world.InteractionResultonPartActivated(PartTypeConnectorOmniDirectional.State partState, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.phys.BlockHitResult hit) Called when a part is right-clicked.voidonPostRemoved(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Called after this element has been removed.protected voidremovePosition(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) static net.minecraft.world.item.ItemStacktransformCraftingOutput(net.minecraft.world.item.crafting.CraftingInput inventory, net.minecraft.world.item.ItemStack staticOutput) Methods inherited from class org.cyclops.integrateddynamics.part.PartTypeConnector
afterNetworkReAlive, createBlock, supportsOffsetsMethods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getMod, getModId, getSubscribedEvents, getUniqueName, hasEventSubscriptions, onEvent, registerBlock, writeExtraGuiDataMethods inherited from class org.cyclops.integrateddynamics.api.part.PartTypeAdapter
afterNetworkAlive, beforeNetworkKill, defaultBlockState, deserializeState, getChannel, getCloneItemStack, getMinimumUpdateInterval, getPriority, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, isUpdate, onBlockNeighborChange, onBlockNeighborChange, onNetworkRemoval, onOffsetVariablesChanged, onPreRemoved, postUpdate, serializeState, setEnabled, setPriorityAndChannel, setTargetOffset, setTargetSideOverride, setUpdateInterval, shouldTriggerBlockRenderUpdate, update, updateTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.part.IPartType
getContainerProvider, getContainerProviderOffsets, getContainerProviderSettings, getItem, getPartRenderPosition, writeExtraGuiDataOffsets, writeExtraGuiDataSettings
-
Field Details
-
LOADED_GROUPS
-
-
Constructor Details
-
PartTypeConnectorOmniDirectional
-
-
Method Details
-
getConsumptionRate
- Specified by:
getConsumptionRatein interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
getConsumptionRatein classPartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
state- The state- Returns:
- The consumption rate of this part for the given state.
-
constructDefaultState
- Specified by:
constructDefaultStatein classPartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Returns:
- Constructor call for a new default state for this part type.
-
getItemStack
public net.minecraft.world.item.ItemStack getItemStack(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.util.ProblemReporter.PathElement problemPath, PartTypeConnectorOmniDirectional.State state, boolean saveState) Description copied from interface:IPartTypeGet the itemstack from the given state.- Specified by:
getItemStackin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
getItemStackin classPartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
valueDeseralizationContext-problemPath-state- The statesaveState- If the part state should be saved in the item.- Returns:
- The itemstack possibly containing the state information.
-
getState
public PartTypeConnectorOmniDirectional.State getState(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.util.ProblemReporter.PathElement problemPath, net.minecraft.world.item.ItemStack itemStack) Description copied from interface:IPartTypeGet the part state from the given itemstack.- Specified by:
getStatein interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
getStatein classPartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
valueDeseralizationContext-problemPath-itemStack- The itemstack possibly containing state information.- Returns:
- The state contained in the itemstack or the default part state.
-
onNetworkAddition
public void onNetworkAddition(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Description copied from interface:IPartTypeCalled when this element is added to the network.- Specified by:
onNetworkAdditionin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
onNetworkAdditionin classPartTypeConnector<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
network- The network to update in.partNetwork- The part network to update in.target- The target block.state- The state
-
onPostRemoved
public void onPostRemoved(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Description copied from interface:IPartTypeCalled after this element has been removed.- Specified by:
onPostRemovedin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
onPostRemovedin classPartTypeAdapter<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
network- The network.partNetwork- The part network to update in.target- The target block.state- The state
-
addPosition
protected void addPosition(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) -
removePosition
protected void removePosition(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) -
generateGroupId
public static int generateGroupId() -
loadTooltip
public void loadTooltip(PartTypeConnectorOmniDirectional.State state, List<net.minecraft.network.chat.Component> lines) Description copied from interface:IPartTypeAdd tooltip lines for this aspect when this part is being hovered by a mod like WAILA.- Specified by:
loadTooltipin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
loadTooltipin classPartTypeBase<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
state- The state.lines- The list to add lines to.
-
loadTooltip
public void loadTooltip(net.minecraft.world.item.ItemStack itemStack, Consumer<net.minecraft.network.chat.Component> tooltipAdder) Description copied from interface:IPartTypeAdd tooltip lines for this aspect when this part's item is being hovered.- Specified by:
loadTooltipin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
loadTooltipin classPartTypeBase<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
itemStack- The itemstack.tooltipAdder- The list to add lines to.
-
getStatus
-
getBlockState
public net.minecraft.world.level.block.state.BlockState getBlockState(IPartContainer partContainer, net.minecraft.core.Direction side) Description copied from interface:IPartTypeGet the base block state that will be rendered for this part. An appropriateIgnoredBlock.FACINGproperty will be set.- Specified by:
getBlockStatein interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
getBlockStatein classPartTypeBase<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
partContainer- The part entity.side- The position of the part.- Returns:
- The block state to render with.
-
transformCraftingOutput
public static net.minecraft.world.item.ItemStack transformCraftingOutput(net.minecraft.world.item.crafting.CraftingInput inventory, net.minecraft.world.item.ItemStack staticOutput) -
onPartActivated
public net.minecraft.world.InteractionResult onPartActivated(PartTypeConnectorOmniDirectional.State partState, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.phys.BlockHitResult hit) Description copied from interface:IPartTypeCalled when a part is right-clicked.- Specified by:
onPartActivatedin interfaceIPartType<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Overrides:
onPartActivatedin classPartTypeBase<PartTypeConnectorOmniDirectional,PartTypeConnectorOmniDirectional.State> - Parameters:
partState- The state of this part.pos- The position of the block this part is part of.world- The world.player- The player activating the part.hand- The hand in use by the player.heldItem- The held item.hit- The ray trace hit result.- Returns:
- The action result.
-