comparator
Create a comparator facing in the direction you choose. You can decide what type of comparison you want it to make.
blocks.comparator(WEST, ComparatorMode.Compare);
Parameters
- direction: the direction which the comparator is facing
- mode: the comparison mode of the comparator:
compare
: compares surrounding block signal strengthsubtract
: subtract the signal strength of one surrounding block from the signal strength of the other
Read about comparator states in the Minecraft wiki.
Example
Place a comparator facing North and in substraction mode near the player.
blocks.place(blocks.comparator(NORTH, ComparatorMode.Substract), pos(1, 0, 0));