Class TranslatableContent
Namespace: Void.Minecraft.Components.Text.Properties.Content
Assembly: Void.Minecraft.dll
Represents a text component whose displayed value is resolved from a client translation key.
public record TranslatableContent : IContent, IEquatable<TranslatableContent>Inheritance
Implements
IContent, IEquatable<TranslatableContent>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Serializers omit Fallback and With when they are null.
Constructors
TranslatableContent(string, string?, IEnumerable<Component>?)
Represents a text component whose displayed value is resolved from a client translation key.
public TranslatableContent(string Translate, string? Fallback = null, IEnumerable<Component>? With = null)Parameters
Translate string
The translation key written to the component’s translate field.
Fallback string?
Optional literal text used when the client cannot resolve Translate.
With IEnumerable<Component>?
Optional
Remarks
Serializers omit Fallback and With when they are null.
Properties
Fallback
Optional literal text used when the client cannot resolve Translate.
public string? Fallback { get; init; }Property Value
Translate
The translation key written to the component’s translate field.
public string Translate { get; init; }Property Value
Type
public string Type { get; }Property Value
With
Optional
public IEnumerable<Component>? With { get; init; }