Package net.commoble.exmachina.api.content

# Enum Class DefaultSignalComponent

java.lang.Object
java.lang.Enum<DefaultSignalComponent>
net.commoble.exmachina.api.content.DefaultSignalComponent

All Implemented Interfaces:
  `Serializable`, `Comparable<DefaultSignalComponent>`, `Constable`, `SignalComponent`

public enum DefaultSignalComponent extends Enum<DefaultSignalComponent> implements SignalComponent
Default SignalComponent used for blocks that have no source assigned to them. Permits a given Face in the block to connect to a graph if: if the block's support shape touches the outer side of the blockpos cube

- `IBlockStateExtension.canRedstoneConnectTo(net.minecraft.world.level.BlockGetter, net.minecraft.core.BlockPos, net.minecraft.core.Direction)` is true for this block
- The Face of this block shares the same Direction as the connecting face
- The connecting block is adjacent to this block
- This block's support shape touches the outer side of the blockpos cube
- and this block's support shape on the touching face is at least 2x2 sixteenths on the center edge:

    /----------------\
    |       xx       |
    |       xx       |
    |                |
    |                |
    |                |
    |                |
    |                |
    |xx            xx|
    |xx            xx|
    |                |
    |                |
    |                |
    |                |
    |                |
    |       xx       |
    |       xx       |
    \----------------/

    {
            "type": "exmachina:default"
    }

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`INSTANCE`
Singleton instance of DefaultSource

## Field Summary

Fields
Modifier and Type
Field
Description
`static final com.mojang.serialization.MapCodec<DefaultSignalComponent>`
`CODEC`
{"type": "exmachina:default"}
`static final net.minecraft.resources.ResourceKey<com.mojang.serialization.MapCodec<? extends SignalComponent>>`
`KEY`
exmachina:signal_source_type / exmachina:default

## Method Summary

Modifier and Type
Method
Description
`com.mojang.serialization.MapCodec<? extends SignalComponent>`
`codec()`
Returns the sub-codec for this component type registered via `ExMachinaRegistries.SIGNAL_COMPONENT_TYPE`
`Collection<TransmissionNode>`
`getTransmissionNodes(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> levelKey, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, Channel channel)`
Defines the TransmissionNode at a given pos/face/channel
`boolean`
`updateSelfFromNeighborsAfterGraphUpdate(net.minecraft.world.level.LevelReader level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos)`
If true, neighborChanged will be invoked on this block after a graph update occurs (default false)
`static DefaultSignalComponent`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DefaultSignalComponent[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### INSTANCE

public static final DefaultSignalComponent INSTANCE
Singleton instance of DefaultSource

## Field Details

### KEY

public static final net.minecraft.resources.ResourceKey<com.mojang.serialization.MapCodec<? extends SignalComponent>> KEY
exmachina:signal_source_type / exmachina:default

### CODEC

public static final com.mojang.serialization.MapCodec<DefaultSignalComponent> CODEC

    {"type": "exmachina:default"}

## Method Details

### values

public static DefaultSignalComponent[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static DefaultSignalComponent valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### codec

public com.mojang.serialization.MapCodec<? extends SignalComponent> codec()
Description copied from interface: `SignalComponent`
Returns the sub-codec for this component type registered via `ExMachinaRegistries.SIGNAL_COMPONENT_TYPE`

Specified by:
  `codec` in interface `SignalComponent`
Returns:
  sub-codec

### getTransmissionNodes

public Collection<TransmissionNode> getTransmissionNodes(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> levelKey, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, Channel channel)
Description copied from interface: `SignalComponent`
Defines the TransmissionNode at a given pos/face/channel

Specified by:
  `getTransmissionNodes` in interface `SignalComponent`
Parameters:
  `levelKey` - ResourceKey of the blockgetter
  `level` - BlockGetter where the SignalComponent block is
  `pos` - BlockPos where this SignalComponent block is
  `state` - BlockState of this SignalComponent block
  `channel` - Channel to get nodes for
Returns:
  Collection of TransmissionNodes for the provided context. Any transmission nodes at the same level+pos+channel must have a unique NodeShape.

### updateSelfFromNeighborsAfterGraphUpdate

public boolean updateSelfFromNeighborsAfterGraphUpdate(net.minecraft.world.level.LevelReader level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos)
Description copied from interface: `SignalComponent`
If true, neighborChanged will be invoked on this block after a graph update occurs (default false)

Specified by:
  `updateSelfFromNeighborsAfterGraphUpdate` in interface `SignalComponent`
Parameters:
  `level` - LevelReader where the block is
  `state` - BlockState of the block
  `pos` - BlockPos where the block is
Returns:
  boolean indicating that the block should receive neighbor updates after a graph update if true