Package net.commoble.exmachina.api.content

# Enum Class DefaultReceiver

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

All Implemented Interfaces:
  `Serializable`, `Comparable<DefaultReceiver>`, `Constable`, `SignalReceiver`

public enum DefaultReceiver extends Enum<DefaultReceiver> implements SignalReceiver
Default SignalReceiver used for blocks that have none assigned to them. No-ops.

    {
            "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 DefaultReceiver

## Field Summary

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

## Method Summary

Modifier and Type
Method
Description
`com.mojang.serialization.MapCodec<? extends SignalReceiver>`
`codec()`
Returns sub-codec for this receiver type registered via `ExMachinaRegistries.SIGNAL_RECEIVER_TYPE`.
`Collection<Receiver>`
`getAllReceivers(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos receiverPos, net.minecraft.world.level.block.state.BlockState receiverState, Channel channel)`
Retrieves all Receiver instances returnable by `SignalReceiver.getReceiverEndpoint(net.minecraft.world.level.BlockGetter,net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction,net.commoble.exmachina.api.Face,net.commoble.exmachina.api.Channel)`
`@Nullable Receiver`
`getReceiverEndpoint(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos receiverPos, net.minecraft.world.level.block.state.BlockState receiverState, net.minecraft.core.Direction receiverSide, Face connectedFace, Channel channel)`
Provides Receiver functions to the grapher at a given position
`static DefaultReceiver`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DefaultReceiver[]`
`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`

### Methods inherited from interface net.commoble.exmachina.api.SignalReceiver

`resetUnusedReceivers`

## Enum Constant Details

### INSTANCE

public static final DefaultReceiver INSTANCE
Singleton instance of DefaultReceiver

## Field Details

### KEY

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

### CODEC

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

    {"type": "exmachina:default"}

## Method Details

### values

public static DefaultReceiver[] 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 DefaultReceiver 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 SignalReceiver> codec()
Description copied from interface: `SignalReceiver`
Returns sub-codec for this receiver type registered via `ExMachinaRegistries.SIGNAL_RECEIVER_TYPE`.

Specified by:
  `codec` in interface `SignalReceiver`
Returns:
  sub-codec for this receiver type registered via `ExMachinaRegistries.SIGNAL_RECEIVER_TYPE`

### getReceiverEndpoint

@Nullable public @Nullable Receiver getReceiverEndpoint(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos receiverPos, net.minecraft.world.level.block.state.BlockState receiverState, net.minecraft.core.Direction receiverSide, Face connectedFace, Channel channel)
Description copied from interface: `SignalReceiver`
Provides Receiver functions to the grapher at a given position

Specified by:
  `getReceiverEndpoint` in interface `SignalReceiver`
Parameters:
  `level` - Level where the signal graph exists
  `receiverPos` - BlockPos where this receiver's block exists
  `receiverState` - BlockState of this receiver's block
  `receiverSide` - Direction of the face of the receiverpos where this receiver exists, e.g. down -> the bottom of receiverPos
  `connectedFace` - Face (pos+direction) of the graph node which is attempting to connect to this receiver
  `channel` - Channel this receiver is attempting to be reached on
Returns:
  Receiver function to invoke after the signal graph updates (or null if no receiver node exists for the given context)

### getAllReceivers

public Collection<Receiver> getAllReceivers(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos receiverPos, net.minecraft.world.level.block.state.BlockState receiverState, Channel channel)
Description copied from interface: `SignalReceiver`
Retrieves all Receiver instances returnable by `SignalReceiver.getReceiverEndpoint(net.minecraft.world.level.BlockGetter,net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction,net.commoble.exmachina.api.Face,net.commoble.exmachina.api.Channel)`

Specified by:
  `getAllReceivers` in interface `SignalReceiver`
Parameters:
  `level` - Level where the signal graph exists
  `receiverPos` - BlockPos where this receiver's block exists
  `receiverState` - BlockState of this receiver's block
  `channel` - Channel this receiver is attempting to be reached on
Returns:
  Collection of all receiver functions that can conceivably be returned by `SignalReceiver.getReceiverEndpoint(net.minecraft.world.level.BlockGetter,net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction,net.commoble.exmachina.api.Face,net.commoble.exmachina.api.Channel)`