laser_pointer
A pointable laser. Reports its facing, firing state, redstone output, range, and color; color and rainbow mode are scriptable.
| getAxis() | Get the laser's facing direction. |
|---|---|
| isFiring() | Check whether the laser is currently firing. |
| getPower() | Get the output redstone power. |
| getRange() | Get the laser's effective range. |
| getColor() | Get the laser color. |
| setColor(color) | Set the laser color. |
| isRainbow() | Check whether rainbow mode is enabled. |
| setRainbow(rainbow) | Toggle rainbow color mode. |
- getAxis()Source
Get the laser's facing direction.
Returns
stringThe serialized direction name.
- isFiring()Source
Check whether the laser is currently firing.
Returns
booleanTrue if firing.
- getPower()Source
Get the output redstone power.
Returns
numberOutput redstone power 0..15 (post-inversion).
- getRange()Source
Get the laser's effective range.
Returns
numberThe laser range.
- getColor()Source
Get the laser color.
Returns
numberARGB-packed color int as used by the block.
- setColor(color)Source
Set the laser color.
Parameters
- color
numberARGB-packed color int.
- color
- isRainbow()Source
Check whether rainbow mode is enabled.
Returns
booleanTrue if rainbow mode is on.
- setRainbow(rainbow)Source
Toggle rainbow color mode.
Parameters
- rainbow
booleanTrue to enable rainbow mode.
- rainbow