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 ajp
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 Summary
Modifier and TypeFieldDescriptionprivate final String
The field for theaddress
record component.static final PacketCodec
<PacketByteBuf, HandshakeC2SPacket> private final ConnectionIntent
The field for theintendedState
record component.private static final int
private final int
The field for theport
record component.private final int
The field for theprotocolVersion
record component. -
Constructor Summary
ModifierConstructorDescriptionHandshakeC2SPacket
(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated.private
-
Method Summary
Modifier and TypeMethodDescriptionaddress()
Returns the value of theaddress
record component.void
apply
(ServerHandshakePacketListener serverHandshakePacketListener) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theintendedState
record component.int
port()
Returns the value of theport
record component.int
Returns the value of theprotocolVersion
record component.final String
toString()
Returns a string representation of this record class.boolean
Returnstrue
if the packet signals transitioning betweenNetworkState
s.private void
write
(PacketByteBuf buf) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable
-
Field Details
-
protocolVersion
private final int protocolVersionThe field for theprotocolVersion
record component. -
address
The field for theaddress
record component. -
port
private final int portThe field for theport
record component. -
intendedState
The field for theintendedState
record component. -
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
Lajp;a:Lzt;
-
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
Lajp;f:I
-
-
Constructor Details
-
HandshakeC2SPacket
@Deprecated public HandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated. -
HandshakeC2SPacket
- 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>
Lajp;<init>(Lws;)V
-
-
Method Details
-
write
- 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
Lajp;a(Lws;)V
-
getPacketId
- Specified by:
getPacketId
in interfacePacket<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
Laac;a()Laae;
-
apply
- Specified by:
apply
in interfacePacket<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
Lajp;a(Lajs;)V
-
transitionsNetworkState
public boolean transitionsNetworkState()Returnstrue
if the packet signals transitioning betweenNetworkState
s.Such packets cannot be bundled.
- Specified by:
transitionsNetworkState
in interfacePacket<ServerHandshakePacketListener>
- Returns:
true
if the packet signals transitioning betweenNetworkState
s- 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
Laac;d()Z
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersion
record component.- Returns:
- the value of the
protocolVersion
record component
-
address
Returns the value of theaddress
record component.- Returns:
- the value of the
address
record component
-
port
public int port()Returns the value of theport
record component.- Returns:
- the value of the
port
record component
-
intendedState
Returns the value of theintendedState
record component.- Returns:
- the value of the
intendedState
record component
-