Package net.commoble.exmachina.api.content

# Record Class WallFloorCeilingSource

java.lang.Object
java.lang.Record
net.commoble.exmachina.api.content.WallFloorCeilingSource

Record Components:
  `invertHorizontalFacing` - if true, the Face of the connecting node must be the opposite of this block's facing property to connect (necessary for buttons and levers which "face away" from their attached face)

All Implemented Interfaces:
  `SignalSource`

public record WallFloorCeilingSource(boolean invertHorizontalFacing) extends Record implements SignalSource
SignalSource intended for `FaceAttachedHorizontalDirectionalBlock`s such as buttons and levers. Blocks with this source type can connect to graph nodes which are adjacent to this block and are attached to the same side.

    {
            "type": "exmachina:wall_floor_ceiling",
            "invert": true
    }

## Field Summary

Fields
Modifier and Type
Field
Description
`static final com.mojang.serialization.MapCodec<WallFloorCeilingSource>`
`CODEC`
`static final net.minecraft.resources.ResourceKey<com.mojang.serialization.MapCodec<? extends SignalSource>>`
`KEY`

## Constructor Summary

Constructors
Constructor
Description
`WallFloorCeilingSource(boolean invertHorizontalFacing)`
Creates an instance of a `WallFloorCeilingSource` record class.

## Method Summary

Modifier and Type
Method
Description
`com.mojang.serialization.MapCodec<? extends SignalSource>`
`codec()`
Returns sub-codec for this source type registered via `ExMachinaRegistries.SIGNAL_SOURCE_TYPE`.
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`Map<Channel,ToIntFunction<net.minecraft.world.level.LevelReader>>`
`getSupplierEndpoints(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos supplierPos, net.minecraft.world.level.block.state.BlockState supplierState, net.minecraft.core.Direction supplierSide, Face connectedFace)`
Describes how much redstone signal power is provided on each channel relevant to this SignalSource for the given context
`final int`
`hashCode()`
Returns a hash code value for this object.
`boolean`
`invertHorizontalFacing()`
Returns the value of the `invertHorizontalFacing` 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`

## Field Details

### KEY

public static final net.minecraft.resources.ResourceKey<com.mojang.serialization.MapCodec<? extends SignalSource>> KEY

### CODEC

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

## Constructor Details

### WallFloorCeilingSource

public WallFloorCeilingSource(boolean invertHorizontalFacing)
Creates an instance of a `WallFloorCeilingSource` record class.

Parameters:
  `invertHorizontalFacing` - the value for the `invertHorizontalFacing` record component

## Method Details

### codec

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

Specified by:
  `codec` in interface `SignalSource`
Returns:
  sub-codec for this source type registered via `ExMachinaRegistries.SIGNAL_SOURCE_TYPE`

### getSupplierEndpoints

public Map<Channel,ToIntFunction<net.minecraft.world.level.LevelReader>> getSupplierEndpoints(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos supplierPos, net.minecraft.world.level.block.state.BlockState supplierState, net.minecraft.core.Direction supplierSide, Face connectedFace)
Description copied from interface: `SignalSource`
Describes how much redstone signal power is provided on each channel relevant to this SignalSource for the given context

Specified by:
  `getSupplierEndpoints` in interface `SignalSource`
Parameters:
  `level` - Level where the signal graph exists
  `supplierPos` - BlockPos of this SignalSource's block
  `supplierState` - BlockState of this SignalSource's block
  `supplierSide` - Direction internal to this SignalSource's position (e.g. down -> the bottom of the supplierPos)
  `connectedFace` - Face (BlockPos + Direction) of the node attempting to connect to this SignalSource
Returns:
  Map of Channel to LevelReader-> int function which provides signal power in range [0,15] on the given channel(s)

### 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 '=='.

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.

### invertHorizontalFacing

public boolean invertHorizontalFacing()
Returns the value of the `invertHorizontalFacing` record component.

Returns:
  the value of the `invertHorizontalFacing` record component