Record Class HandshakeC2SPacket

java.lang.Object
java.lang.Record
net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket
Record Components:
protocolVersion -
address -
port -
intendedState -
All Implemented Interfaces:
Packet<ServerHandshakePacketListener>

public record HandshakeC2SPacket(int protocolVersion, String address, int port, ConnectionIntent intendedState) extends Record implements Packet<ServerHandshakePacketListener>
Mappings:
Namespace Name
named net/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket
intermediary net/minecraft/class_2889
official aij
named protocolVersion
intermediary comp_1563
official b
named address
intermediary comp_1564
official c
named port
intermediary comp_1565
official d
named intendedState
intermediary comp_1566
official e
  • Field Details Link icon

    • protocolVersion Link icon

      private final int protocolVersion
      The field for the protocolVersion record component.
    • address Link icon

      private final String address
      The field for the address record component.
    • port Link icon

      private final int port
      The field for the port record component.
    • intendedState Link icon

      private final ConnectionIntent intendedState
      The field for the intendedState record component.
    • CODEC Link icon

      public static final PacketCodec<PacketByteBuf,HandshakeC2SPacket> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48229 Lnet/minecraft/class_2889;field_48229:Lnet/minecraft/class_9139;
      official a Laij;a:Lyx;
    • MAX_ADDRESS_LENGTH Link icon

      private static final int MAX_ADDRESS_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_ADDRESS_LENGTH Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;MAX_ADDRESS_LENGTH:I
      intermediary field_33372 Lnet/minecraft/class_2889;field_33372:I
      official f Laij;f:I
  • Constructor Details Link icon

    • HandshakeC2SPacket Link icon

      @Deprecated public HandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent)
      Deprecated.
    • HandshakeC2SPacket Link icon

      private HandshakeC2SPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
      intermediary <init> Lnet/minecraft/class_2889;<init>(Lnet/minecraft/class_2540;)V
      official <init> Laij;<init>(Lvw;)V
  • Method Details Link icon

    • write Link icon

      private void write(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;write(Lnet/minecraft/network/PacketByteBuf;)V
      intermediary method_56007 Lnet/minecraft/class_2889;method_56007(Lnet/minecraft/class_2540;)V
      official a Laij;a(Lvw;)V
    • getPacketId Link icon

      public PacketType<HandshakeC2SPacket> getPacketId()
      Specified by:
      getPacketId in interface Packet<ServerHandshakePacketListener>
      Mappings:
      Namespace Name Mixin selector
      named getPacketId Lnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;
      intermediary method_55846 Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;
      official a Lzg;a()Lzi;
    • apply Link icon

      public void apply(ServerHandshakePacketListener serverHandshakePacketListener)
      Specified by:
      apply in interface Packet<ServerHandshakePacketListener>
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;apply(Lnet/minecraft/network/listener/ServerHandshakePacketListener;)V
      intermediary method_12575 Lnet/minecraft/class_2889;method_12575(Lnet/minecraft/class_2890;)V
      official a Laij;a(Laim;)V
    • transitionsNetworkState Link icon

      public boolean transitionsNetworkState()
      Returns true if the packet signals transitioning between NetworkStates.

      Such packets cannot be bundled.

      Specified by:
      transitionsNetworkState in interface Packet<ServerHandshakePacketListener>
      Returns:
      true if the packet signals transitioning between NetworkStates
      Mappings:
      Namespace Name Mixin selector
      named transitionsNetworkState Lnet/minecraft/network/packet/Packet;transitionsNetworkState()Z
      intermediary method_55943 Lnet/minecraft/class_2596;method_55943()Z
      official d Lzg;d()Z
    • toString Link icon

      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 Link icon

      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 Link icon

      public final boolean equals(Object object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • protocolVersion Link icon

      public int protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • address Link icon

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • port Link icon

      public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • intendedState Link icon

      public ConnectionIntent intendedState()
      Returns the value of the intendedState record component.
      Returns:
      the value of the intendedState record component