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.BoundNetwork chatType)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final SignedMessageBody.Packed
The field for thebody
record component.private final ChatType.BoundNetwork
The field for thechatType
record component.private final FilterMask
The field for thefilterMask
record component.private final int
The field for theindex
record component.private final UUID
The field for thesender
record component.private final MessageSignature
The field for thesignature
record component.private final Component
The field for theunsignedContent
record component. -
Constructor Summary
ConstructorDescriptionClientboundPlayerChatPacket
(UUID sender, int index, MessageSignature signature, SignedMessageBody.Packed body, Component unsignedContent, FilterMask filterMask, ChatType.BoundNetwork chatType) Creates an instance of aClientboundPlayerChatPacket
record class.ClientboundPlayerChatPacket
(FriendlyByteBuf p_237741_) -
Method Summary
Modifier and TypeMethodDescriptionbody()
Returns the value of thebody
record component.chatType()
Returns the value of thechatType
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefilterMask
record component.void
handle
(ClientGamePacketListener p_237759_) final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.boolean
sender()
Returns the value of thesender
record component.Returns the value of thesignature
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunsignedContent
record component.void
write
(FriendlyByteBuf p_237755_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
nextProtocol
-
Field Details
-
sender
The field for thesender
record component. -
index
private final int indexThe field for theindex
record component. -
signature
The field for thesignature
record component. -
body
The field for thebody
record component. -
unsignedContent
The field for theunsignedContent
record component. -
filterMask
The field for thefilterMask
record component. -
chatType
The field for thechatType
record component.
-
-
Constructor Details
-
ClientboundPlayerChatPacket
-
ClientboundPlayerChatPacket
public ClientboundPlayerChatPacket(UUID sender, int index, @Nullable MessageSignature signature, SignedMessageBody.Packed body, @Nullable Component unsignedContent, FilterMask filterMask, ChatType.BoundNetwork chatType) Creates an instance of aClientboundPlayerChatPacket
record class.- Parameters:
sender
- the value for thesender
record componentindex
- the value for theindex
record componentsignature
- the value for thesignature
record componentbody
- the value for thebody
record componentunsignedContent
- the value for theunsignedContent
record componentfilterMask
- the value for thefilterMask
record componentchatType
- the value for thechatType
record component
-
-
Method Details
-
write
- Specified by:
write
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
isSkippable
public boolean isSkippable()- Specified by:
isSkippable
in 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 thesender
record component.- Returns:
- the value of the
sender
record component
-
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
signature
Returns the value of thesignature
record component.- Returns:
- the value of the
signature
record component
-
body
Returns the value of thebody
record component.- Returns:
- the value of the
body
record component
-
unsignedContent
Returns the value of theunsignedContent
record component.- Returns:
- the value of the
unsignedContent
record component
-
filterMask
Returns the value of thefilterMask
record component.- Returns:
- the value of the
filterMask
record component
-
chatType
Returns the value of thechatType
record component.- Returns:
- the value of the
chatType
record component
-