Skip to content

Class ResourceSelectorArgumentType.Serializer

Namespace: Void.Minecraft.Commands.Brigadier.ArgumentTypes.RegistryKey
Assembly: Void.Minecraft.dll

Serializes values by reading and writing their registry identifier string.

public class ResourceSelectorArgumentType.Serializer : IArgumentSerializer

Inheritance

objectResourceSelectorArgumentType.Serializer

Implements

IArgumentSerializer

Inherited Members

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

Properties

Instance

Gets the shared stateless serializer.

public static IArgumentSerializer Instance { get; }

Property Value

IArgumentSerializer

Methods

Deserialize(ref BufferSpan, ProtocolVersion)

Reads argument properties from a buffer.

public IArgumentType Deserialize(ref BufferSpan buffer, ProtocolVersion protocolVersion)

Parameters

buffer BufferSpan

The source buffer.

protocolVersion ProtocolVersion

The source protocol version.

Returns

IArgumentType

The decoded argument type or passthrough value.

Serialize(IArgumentType, ref BufferSpan, ProtocolVersion)

Writes argument properties to a buffer.

public void Serialize(IArgumentType value, ref BufferSpan buffer, ProtocolVersion protocolVersion)

Parameters

value IArgumentType

The argument type to encode.

buffer BufferSpan

The destination buffer.

protocolVersion ProtocolVersion

The target protocol version.