public boolean isValid(int id, IC ic) { // TODO Check directions here to make sure it's actually powering the face return BlockUtil.isPowerSource(getPinLocation(id, ic)); }
public static TernaryState isPowered(Location<World> block, Direction face) { Location<World> pow = block.getRelative(face); if (isPowerSource(pow)) { if (getBlockPowerLevel(pow).orElse(0) > 0 || getBlockIndirectPowerLevel(pow).orElse(0) > 0) return TernaryState.TRUE; return TernaryState.FALSE; } return TernaryState.NONE; }