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 - ail- 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 SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaddressrecord component.static final PacketCodec<PacketByteBuf, HandshakeC2SPacket> private final ConnectionIntentThe field for theintendedStaterecord component.private static final intprivate final intThe field for theportrecord component.private final intThe field for theprotocolVersionrecord component.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionHandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated.private
- 
Method SummaryModifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.voidapply(ServerHandshakePacketListener serverHandshakePacketListener) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theintendedStaterecord component.intport()Returns the value of theportrecord component.intReturns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.booleanReturnstrueif the packet signals transitioning betweenNetworkStates.private voidwrite(PacketByteBuf buf) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.PacketisWritingErrorSkippable
- 
Field Details- 
protocolVersionprivate final int protocolVersionThe field for theprotocolVersionrecord component.
- 
addressThe field for theaddressrecord component.
- 
portprivate final int portThe field for theportrecord component.
- 
intendedStateThe field for theintendedStaterecord 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- Lail;a:Lyn;
 
- 
MAX_ADDRESS_LENGTHprivate 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- Lail;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>- Lail;<init>(Lvl;)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- Lail;a(Lvl;)V
 
- 
getPacketType- Specified by:
- getPacketTypein interface- Packet<ServerHandshakePacketListener>
- Mappings:
- Namespace - Name - Mixin selector - named - getPacketType- Lnet/minecraft/network/packet/Packet;getPacketType()Lnet/minecraft/network/packet/PacketType;- intermediary - method_65080- Lnet/minecraft/class_2596;method_65080()Lnet/minecraft/class_9145;- official - a- Lyw;a()Lyy;
 
- 
apply- Specified by:
- applyin 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- Lail;a(Laio;)V
 
- 
transitionsNetworkStatepublic boolean transitionsNetworkState()Returnstrueif the packet signals transitioning betweenNetworkStates.Such packets cannot be bundled. - Specified by:
- transitionsNetworkStatein interface- Packet<ServerHandshakePacketListener>
- Returns:
- trueif 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- Lyw;d()Z
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
protocolVersionpublic int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the protocolVersionrecord component
 
- 
addressReturns the value of theaddressrecord component.- Returns:
- the value of the addressrecord component
 
- 
portpublic int port()Returns the value of theportrecord component.- Returns:
- the value of the portrecord component
 
- 
intendedStateReturns the value of theintendedStaterecord component.- Returns:
- the value of the intendedStaterecord component
 
 
-