Record Class ClientboundPlayerChatPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundPlayerChatPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundPlayerChatPacket(UUID sender, int index, @Nullable MessageSignature signature, SignedMessageBody.Packed body, @Nullable Component unsignedContent, FilterMask filterMask, ChatType.Bound chatType)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SignedMessageBody.PackedThe field for thebodyrecord component.private final ChatType.BoundThe field for thechatTyperecord component.private final FilterMaskThe field for thefilterMaskrecord component.private final intThe field for theindexrecord component.private final UUIDThe field for thesenderrecord component.private final MessageSignatureThe field for thesignaturerecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundPlayerChatPacket> private final ComponentThe field for theunsignedContentrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundPlayerChatPacket(UUID sender, int index, MessageSignature signature, SignedMessageBody.Packed body, Component unsignedContent, FilterMask filterMask, ChatType.Bound chatType) Creates an instance of aClientboundPlayerChatPacketrecord class.private -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.chatType()Returns the value of thechatTyperecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterMaskrecord component.voidhandle(ClientGamePacketListener p_237759_) final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.booleansender()Returns the value of thesenderrecord component.Returns the value of thesignaturerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of theunsignedContentrecord component.private voidwrite(RegistryFriendlyByteBuf p_329687_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isTerminal
-
Field Details
-
sender
The field for thesenderrecord component. -
index
private final int indexThe field for theindexrecord component. -
signature
The field for thesignaturerecord component. -
body
The field for thebodyrecord component. -
unsignedContent
The field for theunsignedContentrecord component. -
filterMask
The field for thefilterMaskrecord component. -
chatType
The field for thechatTyperecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundPlayerChatPacket
-
ClientboundPlayerChatPacket
public ClientboundPlayerChatPacket(UUID sender, int index, @Nullable MessageSignature signature, SignedMessageBody.Packed body, @Nullable Component unsignedContent, FilterMask filterMask, ChatType.Bound chatType) Creates an instance of aClientboundPlayerChatPacketrecord class.- Parameters:
sender- the value for thesenderrecord componentindex- the value for theindexrecord componentsignature- the value for thesignaturerecord componentbody- the value for thebodyrecord componentunsignedContent- the value for theunsignedContentrecord componentfilterMask- the value for thefilterMaskrecord componentchatType- the value for thechatTyperecord component
-
-
Method Details
-
write
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
isSkippable
public boolean isSkippable()- Specified by:
isSkippablein interfacePacket<ClientGamePacketListener>
-
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 '=='. -
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
unsignedContent
Returns the value of theunsignedContentrecord component.- Returns:
- the value of the
unsignedContentrecord component
-
filterMask
Returns the value of thefilterMaskrecord component.- Returns:
- the value of the
filterMaskrecord component
-
chatType
Returns the value of thechatTyperecord component.- Returns:
- the value of the
chatTyperecord component
-