Record Class ServerboundCustomClickActionPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.ServerboundCustomClickActionPacket
- All Implemented Interfaces:
Packet<ServerCommonPacketListener>
public record ServerboundCustomClickActionPacket(Identifier id, Optional<Tag> payload)
extends Record
implements Packet<ServerCommonPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdentifierThe field for theidrecord component.The field for thepayloadrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ServerboundCustomClickActionPacket> private static final StreamCodec<io.netty.buffer.ByteBuf, Optional<Tag>> -
Constructor Summary
ConstructorsConstructorDescriptionServerboundCustomClickActionPacket(Identifier id, Optional<Tag> payload) Creates an instance of aServerboundCustomClickActionPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerCommonPacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.payload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
id
The field for theidrecord component. -
payload
-
UNTRUSTED_TAG_CODEC
-
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf, ServerboundCustomClickActionPacket> STREAM_CODEC
-
-
Constructor Details
-
ServerboundCustomClickActionPacket
Creates an instance of aServerboundCustomClickActionPacketrecord class.- Parameters:
id- the value for theidrecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ServerCommonPacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ServerCommonPacketListener>
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
payload
-