Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Extends
A debug shape class that represents a text label in the world with a background.
Properties
backfaceVisible
backfaceVisible: boolean;
If set to true, the debug text will render the back-face of the background. Defaults to true but will always be false if 'useRotation' is set to false.
Type: boolean
backgroundColorOverride
backgroundColorOverride?: minecraftserver.RGBA;
The color of the background plate of the text. If set to undefined, it will use the default color.
Type: @minecraft/server.RGBA
depthTest
depthTest: boolean;
If set to true, the text will be hidden behind blocks or entities. By default this is set to false (will always render).
Type: boolean
text
read-only text: minecraftserver.RawMessage | string;
Get the text of the debug text shape. Returns the RawText of the debug text if setText was called with a RawMessage or a RawText object, otherwise returns a string.
Type: @minecraft/server.RawMessage | string
textBackfaceVisible
textBackfaceVisible: boolean;
If set to true, the debug text will render the back-face of the text. Defaults to true but will always be false if 'useRotation' is set to false.
Type: boolean
useRotation
useRotation: boolean;
If set to true, the text will not face the camera and instead will use the rotation from the shape.
Type: boolean
Methods
constructor
new DebugText(location: minecraftserver.DimensionLocation | minecraftserver.Vector3, text: minecraftserver.RawMessage | string)
Parameters
- location: @minecraft/server.DimensionLocation | @minecraft/server.Vector3
- text: @minecraft/server.RawMessage | string
Returns DebugText
setText
setText(text: minecraftserver.RawMessage | string): void
Sets the text to display.
Parameters
- text: @minecraft/server.RawMessage | string
Notes:
- This function can throw errors.