Skip to content

Class NbtContent

Namespace: Void.Minecraft.Components.Text.Properties.Content
Assembly: Void.Minecraft.dll

Represents text read from an NBT path in a block, entity, or command-storage source.

public record NbtContent : IContent, IEquatable<NbtContent>

Inheritance

objectNbtContent

Implements

IContent, IEquatable<NbtContent>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

NbtContent(string, string?, bool?, Component?, string?, string?, string?)

Represents text read from an NBT path in a block, entity, or command-storage source.

public NbtContent(string Path, string? Source = null, bool? Interpret = null, Component? Separator = null, string? Block = null, string? Entity = null, string? Storage = null)

Parameters

Path string

The NBT path expression evaluated against the source.

Source string?

An optional generic source value retained by the model.

Interpret bool?

Whether selected strings are interpreted as text components.

Separator Component?

The component inserted between multiple selected values, or null.

Block string?

The block position source, or null.

Entity string?

The entity selector source, or null.

Storage string?

The command-storage resource location, or null.

Properties

Block

The block position source, or null.

public string? Block { get; init; }

Property Value

string?

Entity

The entity selector source, or null.

public string? Entity { get; init; }

Property Value

string?

Interpret

Whether selected strings are interpreted as text components.

public bool? Interpret { get; init; }

Property Value

bool?

Path

The NBT path expression evaluated against the source.

public string Path { get; init; }

Property Value

string

Separator

The component inserted between multiple selected values, or null.

public Component? Separator { get; init; }

Property Value

Component?

Source

An optional generic source value retained by the model.

public string? Source { get; init; }

Property Value

string?

Storage

The command-storage resource location, or null.

public string? Storage { get; init; }

Property Value

string?

Type

Gets the nbt content discriminator.

public string Type { get; }

Property Value

string