Allow pos_offset() to take axis names for direction arguments
rv3r opened this issue ยท 1 comments
Currently, the direction argument of pos_offset()
only takes 'up', 'down', and the cardinal directions. This is handy when a block such as a piston or observer, each of which has many possible directions, is checked by a script. However, not all blocks have states for each of the six directions; they only have three, and these are denoted by axis name, not direction. This leads to the need for the author to make a function that converts from, say, 'x' to 'east', instead of allowing the function to take the argument directly
I think it would be useful to allow the argument to also take the axis names of 'x', 'y', and 'z'.
This would allow the function to be useful with logs, chains, and other blocks. Use of signed values would still provide an offset in the positive or negative direction along the axis.