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
Modifier and TypeClassDescriptionstatic class
static class
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> -
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPosition
(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) static int
net.minecraft.world.level.block.state.BlockState
getBlockState
(IPartContainer partContainer, net.minecraft.core.Direction side) Get the base block state that will be rendered for this part.int
net.minecraft.world.item.ItemStack
getItemStack
(ValueDeseralizationContext valueDeseralizationContext, PartTypeConnectorOmniDirectional.State state, boolean saveState) Get the itemstack from the given state.getState
(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.world.item.ItemStack itemStack) Get the part state from the given itemstack.protected IgnoredBlockStatus.Status
void
loadTooltip
(net.minecraft.world.item.ItemStack itemStack, List<net.minecraft.network.chat.Component> lines) Add tooltip lines for this aspect when this part's item is being hovered.void
loadTooltip
(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.void
onNetworkAddition
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Called when this element is added to the network.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) Called when a part is right-clicked.void
onPostRemoved
(INetwork network, IPartNetwork partNetwork, PartTarget target, PartTypeConnectorOmniDirectional.State state) Called after this element has been removed.protected void
removePosition
(INetwork network, PartTypeConnectorOmniDirectional.State state, PartPos pos) static net.minecraft.world.item.ItemStack
transformCraftingOutput
(net.minecraft.world.item.crafting.CraftingInput inventory, net.minecraft.world.item.ItemStack staticOutput) Methods inherited from class org.cyclops.integrateddynamics.part.PartTypeConnector
afterNetworkReAlive, createBlock, supportsOffsets
Methods inherited from class org.cyclops.integrateddynamics.core.part.PartTypeBase
addDrops, constructNetworkEventActions, createItem, createNetworkElement, createTranslationKey, forceLightTransparency, getBaseBlockState, getBlockModelPath, getMod, getSubscribedEvents, getUniqueName, hasEventSubscriptions, onEvent, registerBlock, writeExtraGuiData
Methods inherited from class org.cyclops.integrateddynamics.api.part.PartTypeAdapter
afterNetworkAlive, beforeNetworkKill, defaultBlockState, fromNBT, getChannel, getCloneItemStack, getMinimumUpdateInterval, getPriority, getTarget, getTargetOffset, getTargetSideOverride, getTranslationKey, getUpdateInterval, hasOffsetVariables, isEnabled, isSolid, isUpdate, onBlockNeighborChange, onNetworkRemoval, onOffsetVariablesChanged, 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
-
Field Details
-
LOADED_GROUPS
-
-
Constructor Details
-
PartTypeConnectorOmniDirectional
-
-
Method Details
-
getConsumptionRate
- Specified by:
getConsumptionRate
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
getConsumptionRate
in classPartTypeAdapter<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Parameters:
state
- The state- Returns:
- The consumption rate of this part for the given state.
-
constructDefaultState
- Specified by:
constructDefaultState
in 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, PartTypeConnectorOmniDirectional.State state, boolean saveState) Description copied from interface:IPartType
Get the itemstack from the given state.- Specified by:
getItemStack
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
getItemStack
in classPartTypeAdapter<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Parameters:
valueDeseralizationContext
-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.world.item.ItemStack itemStack) Description copied from interface:IPartType
Get the part state from the given itemstack.- Specified by:
getState
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
getState
in classPartTypeAdapter<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Parameters:
valueDeseralizationContext
-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:IPartType
Called when this element is added to the network.- Specified by:
onNetworkAddition
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
onNetworkAddition
in 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:IPartType
Called after this element has been removed.- Specified by:
onPostRemoved
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
onPostRemoved
in 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:IPartType
Add tooltip lines for this aspect when this part is being hovered by a mod like WAILA.- Specified by:
loadTooltip
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
loadTooltip
in 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, List<net.minecraft.network.chat.Component> lines) Description copied from interface:IPartType
Add tooltip lines for this aspect when this part's item is being hovered.- Specified by:
loadTooltip
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
loadTooltip
in classPartTypeBase<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Parameters:
itemStack
- The itemstack.lines
- 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:IPartType
Get the base block state that will be rendered for this part. An appropriateIgnoredBlock.FACING
property will be set.- Specified by:
getBlockState
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
getBlockState
in 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:IPartType
Called when a part is right-clicked.- Specified by:
onPartActivated
in interfaceIPartType<PartTypeConnectorOmniDirectional,
PartTypeConnectorOmniDirectional.State> - Overrides:
onPartActivated
in 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.
-