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/HandshakeC2SPacketintermediary net/minecraft/class_2889official aijnamed protocolVersionintermediary comp_1563official bnamed addressintermediary comp_1564official cnamed portintermediary comp_1565official dnamed intendedStateintermediary comp_1566official e
-
Field Summary
FieldsModifier 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 Summary
ConstructorsModifierConstructorDescriptionHandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated.private -
Method Summary
Modifier 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.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.packet.Packet
isWritingErrorSkippable
-
Field Details
-
protocolVersion
private final int protocolVersionThe field for theprotocolVersionrecord component. -
address
The field for theaddressrecord component. -
port
private final int portThe field for theportrecord component. -
intendedState
The field for theintendedStaterecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48229Lnet/minecraft/class_2889;field_48229:Lnet/minecraft/class_9139;official aLaij;a:Lyx;
-
MAX_ADDRESS_LENGTH
private static final int MAX_ADDRESS_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_ADDRESS_LENGTHLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;MAX_ADDRESS_LENGTH:Iintermediary field_33372Lnet/minecraft/class_2889;field_33372:Iofficial fLaij;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;)Vintermediary <init>Lnet/minecraft/class_2889;<init>(Lnet/minecraft/class_2540;)Vofficial <init>Laij;<init>(Lvw;)V
-
-
Method Details
-
write
- Mappings:
Namespace Name Mixin selector named writeLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;write(Lnet/minecraft/network/PacketByteBuf;)Vintermediary method_56007Lnet/minecraft/class_2889;method_56007(Lnet/minecraft/class_2540;)Vofficial aLaij;a(Lvw;)V
-
getPacketId
- Specified by:
getPacketIdin interfacePacket<ServerHandshakePacketListener>- Mappings:
Namespace Name Mixin selector named getPacketIdLnet/minecraft/network/packet/Packet;getPacketId()Lnet/minecraft/network/packet/PacketType;intermediary method_55846Lnet/minecraft/class_2596;method_55846()Lnet/minecraft/class_9145;official aLzg;a()Lzi;
-
apply
- Specified by:
applyin interfacePacket<ServerHandshakePacketListener>- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;apply(Lnet/minecraft/network/listener/ServerHandshakePacketListener;)Vintermediary method_12575Lnet/minecraft/class_2889;method_12575(Lnet/minecraft/class_2890;)Vofficial aLaij;a(Laim;)V
-
transitionsNetworkState
public boolean transitionsNetworkState()Returnstrueif the packet signals transitioning betweenNetworkStates.Such packets cannot be bundled.
- Specified by:
transitionsNetworkStatein interfacePacket<ServerHandshakePacketListener>- Returns:
trueif the packet signals transitioning betweenNetworkStates- Mappings:
Namespace Name Mixin selector named transitionsNetworkStateLnet/minecraft/network/packet/Packet;transitionsNetworkState()Zintermediary method_55943Lnet/minecraft/class_2596;method_55943()Zofficial dLzg;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 theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
intendedState
Returns the value of theintendedStaterecord component.- Returns:
- the value of the
intendedStaterecord component
-