laser_sensor

A laser-receiving sensor. Reports the redstone power it emits and the distance to the nearest laser hit.

getPower()Get the sensor's current redstone output.
getClosestHitDistance()Get the distance to the closest pointer hit observed last tick.
getPower()Source

Get the sensor's current redstone output.

Returns

  1. number Current redstone output 0..15.
getClosestHitDistance()Source

Get the distance to the closest pointer hit observed last tick. Returns nil when no laser is currently striking the sensor.

Returns

  1. number The hit distance, or nil if no hit.