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 aii
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

    • protocolVersion

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

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

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

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

      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 Laii;a:Lyw;
    • MAX_ADDRESS_LENGTH

      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 Laii;f:I
  • Constructor Details

    • HandshakeC2SPacket

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

      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> Laii;<init>(Lvv;)V
  • Method Details

    • write

      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 Laii;a(Lvv;)V
    • getPacketId

      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 Lzf;a()Lzh;
    • apply

      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 Laii;a(Lail;)V
    • transitionsNetworkState

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

      Such packets cannot be

      invalid reference
      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 Lzf;d()Z
    • 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 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

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

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

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

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