rangefinder: pulled some code into the RedstoneChips plugin.