Package commoble.morered.wires

# Class ColoredCableBlockEntity.SidedPowerSupplier

java.lang.Object
commoble.morered.wires.ColoredCableBlockEntity.SidedPowerSupplier

All Implemented Interfaces:
  `ChanneledPowerSupplier`

Enclosing class:
  ColoredCableBlockEntity

protected class ColoredCableBlockEntity.SidedPowerSupplier extends Object implements ChanneledPowerSupplier

## Constructor Summary

Constructors
Constructor
Description
`SidedPowerSupplier(net.minecraft.core.Direction side)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getPowerOnChannel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos wirePos, net.minecraft.world.level.block.state.BlockState wireState, net.minecraft.core.Direction wireFace, int channel)`
Gets the per-channel power of the block this wire connector is assigned to.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SidedPowerSupplier

public SidedPowerSupplier(net.minecraft.core.Direction side)

## Method Details

### getPowerOnChannel

public int getPowerOnChannel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos wirePos, net.minecraft.world.level.block.state.BlockState wireState, @Nullable net.minecraft.core.Direction wireFace, int channel)
Description copied from interface: `ChanneledPowerSupplier`
Gets the per-channel power of the block this wire connector is assigned to. Internally, cable blocks use 0-31 for power storage (redstone-capable cables output half of this value to non-wires).

Specified by:
  `getPowerOnChannel` in interface `ChanneledPowerSupplier`
Parameters:
  `world` - The world we're doing power queries in
  `wirePos` - The position of a wire block
  `wireState` - The blockstate of the block requesting power. Not guaranteed to be any particular class or have any particular blockstate properties.
  `wireFace` - The attachment face of the subwire we're supplying power to. Can be null if e.g. querier isn't a wire-like block.
  `channel` - The channel index we're querying power for. Currently values [0,15] are supported (equivalent to dyecolor ordinals)
Returns:
  a power value in the range [0, 31]