Record Class ClientIntentionPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.handshake.ClientIntentionPacket
- All Implemented Interfaces:
- Packet<ServerHandshakePacketListener>
public record ClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention)
extends Record
implements Packet<ServerHandshakePacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for thehostNamerecord component.private final ClientIntentThe field for theintentionrecord component.private static final intprivate final intThe field for theportrecord component.private final intThe field for theprotocolVersionrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention) Deprecated.ClientIntentionPacket(FriendlyByteBuf p_179801_) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerHandshakePacketListener p_134734_) final inthashCode()Returns a hash code value for this object.hostName()Returns the value of thehostNamerecord component.Returns the value of theintentionrecord 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(FriendlyByteBuf p_134737_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable
- 
Field Details- 
protocolVersionprivate final int protocolVersionThe field for theprotocolVersionrecord component.
- 
hostNameThe field for thehostNamerecord component.
- 
portprivate final int portThe field for theportrecord component.
- 
intentionThe field for theintentionrecord component.
- 
MAX_HOST_LENGTHprivate static final int MAX_HOST_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
ClientIntentionPacket@Deprecated public ClientIntentionPacket(int protocolVersion, String hostName, int port, ClientIntent intention) Deprecated.Creates an instance of aClientIntentionPacketrecord class.- Parameters:
- protocolVersion- the value for the- protocolVersionrecord component
- hostName- the value for the- hostNamerecord component
- port- the value for the- portrecord component
- intention- the value for the- intentionrecord component
 
- 
ClientIntentionPacket
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ServerHandshakePacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ServerHandshakePacketListener>
 
- 
nextProtocol- Specified by:
- nextProtocolin interface- Packet<ServerHandshakePacketListener>
 
- 
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
 
- 
hostNameReturns the value of thehostNamerecord component.- Returns:
- the value of the hostNamerecord component
 
- 
portpublic int port()Returns the value of theportrecord component.- Returns:
- the value of the portrecord component
 
- 
intentionReturns the value of theintentionrecord component.- Returns:
- the value of the intentionrecord component
 
 
-