Record Class ServerboundClientInformationPacket

java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundClientInformationPacket
All Implemented Interfaces:
Packet<ServerGamePacketListener>

public record ServerboundClientInformationPacket(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing) extends Record implements Packet<ServerGamePacketListener>
  • Field Details

    • language

      private final String language
      The field for the language record component.
    • viewDistance

      private final int viewDistance
      The field for the viewDistance record component.
    • chatVisibility

      private final ChatVisiblity chatVisibility
      The field for the chatVisibility record component.
    • chatColors

      private final boolean chatColors
      The field for the chatColors record component.
    • modelCustomisation

      private final int modelCustomisation
      The field for the modelCustomisation record component.
    • mainHand

      private final HumanoidArm mainHand
      The field for the mainHand record component.
    • textFilteringEnabled

      private final boolean textFilteringEnabled
      The field for the textFilteringEnabled record component.
    • allowsListing

      private final boolean allowsListing
      The field for the allowsListing record component.
    • MAX_LANGUAGE_LENGTH

      public static final int MAX_LANGUAGE_LENGTH
      See Also:
  • Constructor Details

    • ServerboundClientInformationPacket

      public ServerboundClientInformationPacket(FriendlyByteBuf p_179560_)
    • ServerboundClientInformationPacket

      public ServerboundClientInformationPacket(String language, int viewDistance, ChatVisiblity chatVisibility, boolean chatColors, int modelCustomisation, HumanoidArm mainHand, boolean textFilteringEnabled, boolean allowsListing)
      Creates an instance of a ServerboundClientInformationPacket record class.
      Parameters:
      language - the value for the language record component
      viewDistance - the value for the viewDistance record component
      chatVisibility - the value for the chatVisibility record component
      chatColors - the value for the chatColors record component
      modelCustomisation - the value for the modelCustomisation record component
      mainHand - the value for the mainHand record component
      textFilteringEnabled - the value for the textFilteringEnabled record component
      allowsListing - the value for the allowsListing record component
  • Method Details

    • write

      public void write(FriendlyByteBuf p_133884_)
      Specified by:
      write in interface Packet<ServerGamePacketListener>
    • handle

      public void handle(ServerGamePacketListener p_133882_)
      Specified by:
      handle in interface Packet<ServerGamePacketListener>
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • viewDistance

      public int viewDistance()
      Returns the value of the viewDistance record component.
      Returns:
      the value of the viewDistance record component
    • chatVisibility

      public ChatVisiblity chatVisibility()
      Returns the value of the chatVisibility record component.
      Returns:
      the value of the chatVisibility record component
    • chatColors

      public boolean chatColors()
      Returns the value of the chatColors record component.
      Returns:
      the value of the chatColors record component
    • modelCustomisation

      public int modelCustomisation()
      Returns the value of the modelCustomisation record component.
      Returns:
      the value of the modelCustomisation record component
    • mainHand

      public HumanoidArm mainHand()
      Returns the value of the mainHand record component.
      Returns:
      the value of the mainHand record component
    • textFilteringEnabled

      public boolean textFilteringEnabled()
      Returns the value of the textFilteringEnabled record component.
      Returns:
      the value of the textFilteringEnabled record component
    • allowsListing

      public boolean allowsListing()
      Returns the value of the allowsListing record component.
      Returns:
      the value of the allowsListing record component