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 official acuintermediary net/minecraft/class_2889named net/minecraft/network/packet/c2s/handshake/HandshakeC2SPacketofficial aintermediary comp_1563named protocolVersionofficial bintermediary comp_1564named addressofficial cintermediary comp_1565named portofficial dintermediary comp_1566named intendedState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaddressrecord component.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
ConstructorsConstructorDescriptionHandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated. -
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.Returns a new network state to transition to, ornullto indicate no state change.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.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. -
MAX_ADDRESS_LENGTH
private static final int MAX_ADDRESS_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector official eLacu;e:Iintermediary field_33372Lnet/minecraft/class_2889;field_33372:Inamed MAX_ADDRESS_LENGTHLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;MAX_ADDRESS_LENGTH:I
-
-
Constructor Details
-
HandshakeC2SPacket
@Deprecated public HandshakeC2SPacket(int int2, String string, int int3, ConnectionIntent connectionIntent) Deprecated. -
HandshakeC2SPacket
- Mappings:
Namespace Name Mixin selector official <init>Lacu;<init>(Lsh;)Vintermediary <init>Lnet/minecraft/class_2889;<init>(Lnet/minecraft/class_2540;)Vnamed <init>Lnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
-
Method Details
-
write
- Specified by:
writein interfacePacket<ServerHandshakePacketListener>- Mappings:
Namespace Name Mixin selector official aLuw;a(Lsh;)Vintermediary method_11052Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/network/packet/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
-
apply
- Specified by:
applyin interfacePacket<ServerHandshakePacketListener>- Mappings:
Namespace Name Mixin selector official aLacu;a(Lacv;)Vintermediary method_12575Lnet/minecraft/class_2889;method_12575(Lnet/minecraft/class_2890;)Vnamed applyLnet/minecraft/network/packet/c2s/handshake/HandshakeC2SPacket;apply(Lnet/minecraft/network/listener/ServerHandshakePacketListener;)V
-
getNewNetworkState
Returns a new network state to transition to, ornullto indicate no state change.- Specified by:
getNewNetworkStatein interfacePacket<ServerHandshakePacketListener>- Returns:
- a new network state to transition to, or
nullto indicate no state change - Mappings:
Namespace Name Mixin selector official cLuw;c()Lsg;intermediary method_52273Lnet/minecraft/class_2596;method_52273()Lnet/minecraft/class_2539;named getNewNetworkStateLnet/minecraft/network/packet/Packet;getNewNetworkState()Lnet/minecraft/network/NetworkState;
-
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
-