Comparator
High-level API
Device name:
comparatorProvided by redstone comparators connected to a bus interface.
Methods
getMode():stringGets the mode the comparator is in.
- Returns
compare or subtract.getOutputSignal():numberGets the signal strength the comparator outputs.
- Returns the signal strength, from
0 to 15.setMode(mode:string)Sets the mode the comparator is in.
-
mode: compare or subtract.Mid-level API
Device name:
CMPRTRMethods
1 getOutputSignalGets the signal strength the comparator outputs.
- Returns one byte, the signal strength, from
0 to 15.2 getModeGets the mode the comparator is in.
- Returns one byte,
0 is compare, 1 is subtract.3 setModeSets the mode the comparator is in.
- Takes one byte,
0 is compare, 1 is subtract.