Skip to content

Interface IPacketProperty

Namespace: Void.Minecraft.Network.Registries.Transformations.Properties
Assembly: Void.Minecraft.dll

Represents an encoded packet field that can write itself to a Minecraft buffer.

public interface IPacketProperty

Methods

As<TCastValue>()

Casts this property to a requested packet-property type.

TCastValue As<TCastValue>() where TCastValue : IPacketProperty

Returns

TCastValue

This instance cast to TCastValue.

Type Parameters

TCastValue

The property type expected by the caller.

Exceptions

InvalidCastException

This instance is not a TCastValue.

Write(ref MinecraftBuffer)

Writes the property’s protocol representation at the current buffer position.

void Write(ref MinecraftBuffer buffer)

Parameters

buffer MinecraftBuffer

The destination buffer.