Skip to content

API reference Obsidian.API

ITextDisplay interface

A text display, like vanilla's Display.TextDisplay: floating text with no hitbox. Changing any property sends the new state to players who are tracking it.

public interface ITextDisplay : IEntity, IAttachmentHolder

In Obsidian.API.

Properties

TextDisplayAlignment Alignment { get; set; }

BackgroundColor

int BackgroundColor { get; set; }

The background colour as ARGB.

TextDisplayBillboard Billboard { get; set; }

LineWidth

int LineWidth { get; set; }

The width in pixels at which lines wrap.

PositionInterpolationDuration

int PositionInterpolationDuration { get; set; }

Ticks over which a position or rotation change, such as a teleport, is smoothed on the client. Vanilla stores this as teleport_duration.

VectorF Scale { get; set; }bool SeeThrough { get; set; }bool Shadow { get; set; }

Text

ChatMessage Text { get; set; }

The text shown. It can't be null.

TextOpacity

byte TextOpacity { get; set; }

The text's opacity from 0 to 255.

Transient

bool Transient { get; set; }

Whether the display is left out of the world's save, so a crash doesn't leave it behind. Like vanilla's saved displays, it is otherwise kept across restarts.

Translation

VectorF Translation { get; set; }

The offset of the text from the entity's position, in blocks.

ViewRange

float ViewRange { get; set; }

The distance multiplier at which the display stops being shown.

On this page