Package net.commoble.exmachina.api

# Record Class TransmissionNode

java.lang.Object
java.lang.Record
net.commoble.exmachina.api.TransmissionNode

Record Components:
  `powerReaders` - Set of Directions to read adjacent vanilla redstone signal power into this graph from (only blocks outside of the graph are read from)
  `connectableNodes` - Set of Faces (BlockPos+Direction) which this graph node can connect to
  `graphListener` - BiFunction to run when a graph update occurs. The provided integer is the graph's new signal power level in the range [0,15], while the Map indicates what adjacent directions should receive neighbor updates after the signal graph updates.

public record TransmissionNode(Set<net.minecraft.core.Direction> powerReaders, Set<Face> connectableNodes, BiFunction<net.minecraft.world.level.LevelAccessor,Integer,Map<net.minecraft.core.Direction,SignalStrength>> graphListener) extends Record
Definition of a `SignalTransmitter` graph node.

## Constructor Summary

Constructors
Constructor
Description
`TransmissionNode(Set<net.minecraft.core.Direction> powerReaders, Set<Face> connectableNodes, BiFunction<net.minecraft.world.level.LevelAccessor,Integer,Map<net.minecraft.core.Direction,SignalStrength>> graphListener)`
Creates an instance of a `TransmissionNode` record class.

## Method Summary

Modifier and Type
Method
Description
`Set<Face>`
`connectableNodes()`
Returns the value of the `connectableNodes` record component.
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`BiFunction<net.minecraft.world.level.LevelAccessor,Integer,Map<net.minecraft.core.Direction,SignalStrength>>`
`graphListener()`
Returns the value of the `graphListener` record component.
`final int`
`hashCode()`
Returns a hash code value for this object.
`Set<net.minecraft.core.Direction>`
`powerReaders()`
Returns the value of the `powerReaders` record component.
`final String`
`toString()`
Returns a string representation of this record class.

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### TransmissionNode

public TransmissionNode(Set<net.minecraft.core.Direction> powerReaders, Set<Face> connectableNodes, BiFunction<net.minecraft.world.level.LevelAccessor,Integer,Map<net.minecraft.core.Direction,SignalStrength>> graphListener)
Creates an instance of a `TransmissionNode` record class.

Parameters:
  `powerReaders` - the value for the `powerReaders` record component
  `connectableNodes` - the value for the `connectableNodes` record component
  `graphListener` - the value for the `graphListener` record component

## Method Details

### toString

public final String toString()
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.

Specified by:
  `toString` in class `Record`
Returns:
  a string representation of this object

### hashCode

public final int hashCode()
Returns a hash code value for this object. The value is derived from the hash code of each of the record components.

Specified by:
  `hashCode` in class `Record`
Returns:
  a hash code value for this object

### equals

public final boolean equals(Object o)
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with `Objects::equals(Object,Object)`.

Specified by:
  `equals` in class `Record`
Parameters:
  `o` - the object with which to compare
Returns:
  `true` if this object is the same as the `o` argument; `false` otherwise.

### powerReaders

public Set<net.minecraft.core.Direction> powerReaders()
Returns the value of the `powerReaders` record component.

Returns:
  the value of the `powerReaders` record component

### connectableNodes

public Set<Face> connectableNodes()
Returns the value of the `connectableNodes` record component.

Returns:
  the value of the `connectableNodes` record component

### graphListener

public BiFunction<net.minecraft.world.level.LevelAccessor,Integer,Map<net.minecraft.core.Direction,SignalStrength>> graphListener()
Returns the value of the `graphListener` record component.

Returns:
  the value of the `graphListener` record component