Record Class ServerboundCookieResponsePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket
- All Implemented Interfaces:
Packet<ServerCookiePacketListener>
public record ServerboundCookieResponsePacket(Identifier key, byte @Nullable [] payload)
extends Record
implements Packet<ServerCookiePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for thekeyrecord component.private final byte @Nullable []The field for thepayloadrecord component.static final StreamCodec<FriendlyByteBuf, ServerboundCookieResponsePacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateServerboundCookieResponsePacket(Identifier key, byte @Nullable [] payload) Creates an instance of aServerboundCookieResponsePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerCookiePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.byte @Nullable []payload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf output) Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
key
The field for thekeyrecord component. -
payload
private final byte @Nullable [] payloadThe field for thepayloadrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ServerboundCookieResponsePacket
-
ServerboundCookieResponsePacket
Creates an instance of aServerboundCookieResponsePacketrecord class.- Parameters:
key- the value for thekeyrecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ServerCookiePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ServerCookiePacketListener>
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
payload
public byte @Nullable [] payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-