API reference Obsidian.API.Blocks
ISignalReader interface
Reads redstone power, like vanilla's SignalGetter. A block gives each neighbour a weak signal (it powers the neighbour, like a lit torch powers the dust beside it) and a strong one (it also powers through the neighbour when that's a conductor, like a torch powers the block above it). A conductor, like stone, passes on the strong signals it gets as a weak signal to its own neighbours.
public interface ISignalReader
In Obsidian.API.
Remarks
Directions are vanilla's: a direction points from the block receiving the power to the block at the position asked about, so a block reads its west neighbour with GetSignal(position + west, West). Powers go from 0 to 15.
Methods
GetBestNeighborSignal(Vector)
int GetBestNeighborSignal(Vector position);The most power any neighbour gives the block at position, like vanilla's getBestNeighborSignal.
GetDirectSignal(Vector, BlockFace)
int GetDirectSignal(Vector position, BlockFace direction);The strong power the block at position gives the block it's asked from, like vanilla's getDirectSignal.
GetDirectSignalTo(Vector)
int GetDirectSignalTo(Vector position);The most strong power any neighbour gives the block at position, like vanilla's getDirectSignalTo: what a conductor there passes on.
GetSignal(Vector, BlockFace)
int GetSignal(Vector position, BlockFace direction);The power the block at position gives the block it's asked from, like vanilla's getSignal: its weak signal toward it, or, for a conductor, the most strong power it receives itself.
HasNeighborSignal(Vector)
bool HasNeighborSignal(Vector position);Whether any neighbour of the block at position powers it, like vanilla's hasNeighborSignal: what a lamp lights by.
HasSignal(Vector, BlockFace)
bool HasSignal(Vector position, BlockFace direction);Whether ISignalReader.GetSignal is above 0, like vanilla's hasSignal.