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
numberCurrent 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
numberThe hit distance, or nil if no hit.