Sign
High-level API
Device name:
signMethods
getColor(side:string):stringGets the color of the text on a side of the sign.
-
side: front or back.- Returns the name of the color.
getText(side:string):tableGets the text on a side of the sign.
-
side: front or back.- Returns the current text lines.
isGlowing(side:string):booleanGets whether the text on a side of the sign glows.
-
side: front or back.- Returns
true if the text glows.isReadonly():booleanGets whether the sign is read-only.
- Returns whether the sign is read-only.
setText(side:string, lines:table)Sets the text on a side of the sign.
-
side: front or back.-
lines: up to four lines of text.Mid-level API
Device name:
SIGNSides are numbered:
0 for front, 1 for back.Colors are numbered as dyes:
0 white, 1 orange, 2 magenta, 3 light blue, 4 yellow, 5 lime, 6 pink, 7 gray, 8 light gray, 9 cyan, 10 purple, 11 blue, 12 brown, 13 green, 14 red, 15 black.Methods
1 getLineGets a line of text on a side of the sign.
- Takes two bytes, the side,
0 for front, 1 for back, and the line.- Returns the text. Read while
OCDAV is set to read fully.2 setLineSets a line of text on a side of the sign.
- Takes the side,
0 for front, 1 for back, and the line as one byte each, then the text.3 getColorGets the color of the text on a side of the sign.
- Takes one byte,
0 for front, 1 for back.- Returns one byte, the color code.
4 isGlowingGets whether the text on a side of the sign glows.
- Takes one byte,
0 for front, 1 for back.- Returns one byte,
1 if the text glows, 0 otherwise.5 isReadonlyGets whether the sign is read-only.
- Returns one byte,
1 if read-only, 0 otherwise.