Class DoubleArgumentSerializer
Namespace: Void.Minecraft.Commands.Brigadier.Serializers
Assembly: Void.Minecraft.dll
Reads and writes optional double-argument bounds.
public class DoubleArgumentSerializer : IArgumentSerializerInheritance
object ← DoubleArgumentSerializer
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Fields
HAS_MAXIMUM
Indicates that an explicit maximum follows the flag byte.
public const byte HAS_MAXIMUM = 2Field Value
HAS_MINIMUM
Indicates that a serialized
public const byte HAS_MINIMUM = 1Field Value
Properties
Instance
Gets the shared stateless serializer.
public static IArgumentSerializer Instance { get; }Property Value
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
The decoded argument type or passthrough value.
Serialize(IArgumentType, ref BufferSpan, ProtocolVersion)
Serializes a double command argument into the Brigadier argument payload.
public void Serialize(IArgumentType argumentType, ref BufferSpan buffer, ProtocolVersion protocolVersion)Parameters
argumentType IArgumentType
The
buffer BufferSpan
The destination buffer that receives the flag byte and any explicit bounds.
protocolVersion ProtocolVersion
The protocol version for the serialized payload; this serializer uses the same format for every version.
Exceptions
Thrown when argumentType is not a