Class MinecraftPacketIdPluginsRegistryExtensions
Namespace: Void.Minecraft.Network.Registries.PacketId.Extensions
Assembly: Void.Minecraft.dll
Connects plugin packet-ID ownership with plugin transformation lookup.
public static class MinecraftPacketIdPluginsRegistryExtensionsInheritance
object ← MinecraftPacketIdPluginsRegistryExtensions
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
TryGetTransformations(IMinecraftPacketIdPluginsRegistry, IMinecraftPacketTransformationsPluginsRegistry, IMinecraftPacket, TransformationType, out MinecraftPacketTransformation[])
Attempts to find transformations contributed by the plugin that owns a packet’s runtime type mapping.
public static bool TryGetTransformations(this IMinecraftPacketIdPluginsRegistry registriesHolder, IMinecraftPacketTransformationsPluginsRegistry transformationsHolder, IMinecraftPacket packet, TransformationType transformationType, out MinecraftPacketTransformation[] transformations)Parameters
registriesHolder IMinecraftPacketIdPluginsRegistry
The plugin packet-ID registries used to identify ownership.
transformationsHolder IMinecraftPacketTransformationsPluginsRegistry
The plugin transformation registries to query.
packet IMinecraftPacket
The packet whose runtime type is queried.
transformationType TransformationType
The upgrade or downgrade pipeline to retrieve.
transformations MinecraftPacketTransformation[]
When successful, the ordered transformation array; otherwise, null.
Returns
true when an owning plugin and exact transformation entry are found; otherwise, false.
TryGetTransformations(IMinecraftPacketIdPluginsRegistry, IMinecraftPacketTransformationsPluginsRegistry, Type, TransformationType, out MinecraftPacketTransformation[])
Attempts to find transformations contributed by the plugin that owns a packet type mapping.
public static bool TryGetTransformations(this IMinecraftPacketIdPluginsRegistry registriesHolder, IMinecraftPacketTransformationsPluginsRegistry transformationsHolder, Type packetType, TransformationType transformationType, out MinecraftPacketTransformation[] transformations)Parameters
registriesHolder IMinecraftPacketIdPluginsRegistry
The plugin packet-ID registries used to identify ownership.
transformationsHolder IMinecraftPacketTransformationsPluginsRegistry
The plugin transformation registries to query.
packetType Type
The exact packet type whose transformation entry is requested.
transformationType TransformationType
The upgrade or downgrade pipeline to retrieve.
transformations MinecraftPacketTransformation[]
When successful, the ordered transformation array; otherwise, null.
Returns
true when an owning plugin and exact transformation entry are found; otherwise, false.
Remarks
When packet ownership is found, the built-in implementation calls
Exceptions
Packet ownership is found but the transformation holder has no configured protocol version.