Record Class ServerboundRegisteredArgumentTypesPacket

java.lang.Object
java.lang.Record
net.kyori.adventure.platform.fabric.impl.ServerboundRegisteredArgumentTypesPacket
Record Components:
known - Known argument type ids

public record ServerboundRegisteredArgumentTypesPacket(Set<net.minecraft.resources.ResourceLocation> known) extends Record
A packet sent client to server, to let the server know which optional argument types are available on the server.

This packet is sent by players on join, before the command tree is sent to the client.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerboundRegisteredArgumentTypesPacket(Set<net.minecraft.resources.ResourceLocation> known)
    Creates an instance of a ServerboundRegisteredArgumentTypesPacket record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Set<net.minecraft.resources.ResourceLocation>
    Returns the value of the known record component.
    of(@NotNull net.minecraft.network.FriendlyByteBuf buf)
     
    of(Set<net.minecraft.resources.ResourceLocation> idents)
     
    static void
     
    void
    sendTo(net.fabricmc.fabric.api.networking.v1.PacketSender sender)
    Send the client's list of identifiers to the server.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ID

      public static final net.minecraft.resources.ResourceLocation ID
  • Constructor Details

    • ServerboundRegisteredArgumentTypesPacket

      public ServerboundRegisteredArgumentTypesPacket(Set<net.minecraft.resources.ResourceLocation> known)
      Creates an instance of a ServerboundRegisteredArgumentTypesPacket record class.
      Parameters:
      known - the value for the known record component
  • Method Details

    • register

      public static void register()
    • of

      public static ServerboundRegisteredArgumentTypesPacket of(Set<net.minecraft.resources.ResourceLocation> idents)
    • of

      public static ServerboundRegisteredArgumentTypesPacket of(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
    • sendTo

      public void sendTo(net.fabricmc.fabric.api.networking.v1.PacketSender sender)
      Send the client's list of identifiers to the server.
      Parameters:
      sender - the sender to send the packet to
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • known

      public Set<net.minecraft.resources.ResourceLocation> known()
      Returns the value of the known record component.
      Returns:
      the value of the known record component