Skip to content

Class ComponentJsonTransformers

Namespace: Void.Minecraft.Components.Text.Transformers
Assembly: Void.Minecraft.dll

public static class ComponentJsonTransformers

Inheritance

objectComponentJsonTransformers

Inherited Members

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

Methods

Apply(IMinecraftBinaryPacketWrapper, ProtocolVersion, ProtocolVersion)

Transforms the next payload in wrapper between two protocol versions.

public static void Apply(IMinecraftBinaryPacketWrapper wrapper, ProtocolVersion from, ProtocolVersion to)

Parameters

wrapper IMinecraftBinaryPacketWrapper

The packet wrapper containing the component property to transform.

from ProtocolVersion

The source protocol version.

to ProtocolVersion

The destination protocol version.

Remarks

The method reads the current value from wrapper, applies the JSON component migration rules for from and to, and writes the transformed value back to the same wrapper. If the payload is not valid component JSON, it is written back unchanged.

Apply(StringProperty, ProtocolVersion, ProtocolVersion)

public static StringProperty Apply(StringProperty property, ProtocolVersion from, ProtocolVersion to)

Parameters

property StringProperty

from ProtocolVersion

to ProtocolVersion

Returns

StringProperty

Apply(string, ProtocolVersion, ProtocolVersion)

public static string Apply(string value, ProtocolVersion from, ProtocolVersion to)

Parameters

value string

from ProtocolVersion

to ProtocolVersion

Returns

string

Apply(JsonNode, ProtocolVersion, ProtocolVersion)

public static JsonNode Apply(JsonNode node, ProtocolVersion from, ProtocolVersion to)

Parameters

node JsonNode

from ProtocolVersion

to ProtocolVersion

Returns

JsonNode

Downgrade_v1_12_to_v1_11_1(JsonNode)

public static JsonNode Downgrade_v1_12_to_v1_11_1(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode

Downgrade_v1_16_to_v1_15_2(JsonNode)

public static JsonNode Downgrade_v1_16_to_v1_15_2(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode

Downgrade_v1_9_to_v1_8(JsonNode)

public static JsonNode Downgrade_v1_9_to_v1_8(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode

Passthrough_v1_11_1_to_v1_12(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_11_1_to_v1_12(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Passthrough_v1_12_to_v1_11_1(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_12_to_v1_11_1(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Passthrough_v1_15_2_to_v1_16(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_15_2_to_v1_16(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Passthrough_v1_16_to_v1_15_2(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_16_to_v1_15_2(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Passthrough_v1_8_to_v1_9(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_8_to_v1_9(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Passthrough_v1_9_to_v1_8(IMinecraftBinaryPacketWrapper)

public static void Passthrough_v1_9_to_v1_8(IMinecraftBinaryPacketWrapper wrapper)

Parameters

wrapper IMinecraftBinaryPacketWrapper

Upgrade_v1_11_1_to_v1_12(JsonNode)

public static JsonNode Upgrade_v1_11_1_to_v1_12(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode

Upgrade_v1_15_2_to_v1_16(JsonNode)

public static JsonNode Upgrade_v1_15_2_to_v1_16(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode

Upgrade_v1_8_to_v1_9(JsonNode)

public static JsonNode Upgrade_v1_8_to_v1_9(JsonNode node)

Parameters

node JsonNode

Returns

JsonNode