Package net.commoble.exmachina.api

# Interface SignalTransmitter

All Known Implementing Classes:
  `DefaultTransmitter`

public interface SignalTransmitter

A SignalTransmitter is a signal graph node assignable to Blocks, which

- Can be connected to by the graph
- Can connect to further graph nodes
- Can be notified of signal power updates
- Can read redstone power from non-graph blocks adjacent to the graph
- Exists at a unique node (BlockPos + Direction + Channel) in any graph

SignalTransmitters can be assigned to blocks via the exmachina:signal_transmitter block datamap:

     data/exmachina/data_maps/block/signal_transmitter.json
     [
       "namespace:blockid": {
         "type": "namespace:transmitter_type_id",
         // additional fields
       }
     ]

## Field Summary

Fields
Modifier and Type
Field
Description
`static final com.mojang.serialization.Codec<SignalTransmitter>`
`CODEC`
Master dispatch codec for SignalTransmitters

## Method Summary

Modifier and Type
Method
Description
`com.mojang.serialization.MapCodec<? extends SignalTransmitter>`
`codec()`
Returns the sub-codec for this transmitter type registered via `ExMachinaRegistries.SIGNAL_TRANSMITTER_TYPE`
`Map<Channel,TransmissionNode>`
`getTransmissionNodes(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction face)`
Defines the TransmissionNode at a given pos/face/channel

## Field Details

### CODEC

static final com.mojang.serialization.Codec<SignalTransmitter> CODEC
Master dispatch codec for SignalTransmitters

## Method Details

### codec

com.mojang.serialization.MapCodec<? extends SignalTransmitter> codec()
Returns the sub-codec for this transmitter type registered via `ExMachinaRegistries.SIGNAL_TRANSMITTER_TYPE`

Returns:
  sub-codec

### getTransmissionNodes

Map<Channel,TransmissionNode> getTransmissionNodes(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction face)
Defines the TransmissionNode at a given pos/face/channel

Parameters:
  `level` - BlockGetter where the wire graph is
  `pos` - BlockPos where this SignalTransmitter is
  `state` - BlockState of this SignalTransmitter's block
  `face` - internal face of this blockpos, e.g. down -> the bottom of pos
Returns:
  Map describing the TransmissionNode on a given channel for the given context