The TextPrimitive class in @minecraft/server.
Class in @minecraft/server
Extends PrimitiveShape
import { TextPrimitive } from '@minecraft/server';Constructor
Section titled “Constructor”constructor(location: DimensionLocation | Vector3, text: RawMessage | string);Parameters
locationDimensionLocation | Vector3textRawMessage | string
Properties
Section titled “Properties”backfaceVisible
Section titled “backfaceVisible”backfaceVisible: boolean;backgroundColorOverride
Section titled “backgroundColorOverride”optional
backgroundColorOverride?: RGBA;Types
depthTest
Section titled “depthTest”depthTest: boolean;lineGapHeight
Section titled “lineGapHeight”lineGapHeight: number;read-only
readonly text: RawMessage | string;Types
textBackfaceVisible
Section titled “textBackfaceVisible”textBackfaceVisible: boolean;useRotation
Section titled “useRotation”useRotation: boolean;Methods
Section titled “Methods”setText
Section titled “setText”setText(text: RawMessage | string): void;Parameters
textRawMessage | string
Types
Used by
Section titled “Used by”PrimitiveShapesManager.addText, PrimitiveShapesManager.removeText
Inherited
Section titled “Inherited”From PrimitiveShape: attachedTo, color, dimension, hasDuration, location, maximumRenderDistance, rotation, scale, timeLeft, totalTimeLeft, visibleTo, remove, setLocation