记录类 ClientboundPlayerChatPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundPlayerChatPacket
- 所有已实现的接口:
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>
-
字段概要
字段修饰符和类型字段说明private final SignedMessageBody.Packed
body
记录组件的字段。private final ChatType.Bound
chatType
记录组件的字段。private final FilterMask
filterMask
记录组件的字段。private final int
index
记录组件的字段。private final UUID
sender
记录组件的字段。private final MessageSignature
signature
记录组件的字段。static final StreamCodec
<RegistryFriendlyByteBuf, ClientboundPlayerChatPacket> private final Component
unsignedContent
记录组件的字段。 -
构造器概要
构造器限定符构造器说明ClientboundPlayerChatPacket
(UUID sender, int index, MessageSignature signature, SignedMessageBody.Packed body, Component unsignedContent, FilterMask filterMask, ChatType.Bound chatType) 创建ClientboundPlayerChatPacket
记录类的实例。private
-
方法概要
修饰符和类型方法说明body()
返回body
记录组件的值。chatType()
返回chatType
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。返回filterMask
记录组件的值。void
handle
(ClientGamePacketListener p_237759_) final int
hashCode()
返回此对象的哈希代码值。int
index()
返回index
记录组件的值。boolean
sender()
返回sender
记录组件的值。返回signature
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。type()
返回unsignedContent
记录组件的值。private void
write
(RegistryFriendlyByteBuf p_329687_) 从接口继承的方法 net.minecraft.network.protocol.Packet
isTerminal
-
字段详细资料
-
sender
sender
记录组件的字段。 -
index
private final int indexindex
记录组件的字段。 -
signature
signature
记录组件的字段。 -
body
body
记录组件的字段。 -
unsignedContent
unsignedContent
记录组件的字段。 -
filterMask
filterMask
记录组件的字段。 -
chatType
chatType
记录组件的字段。 -
STREAM_CODEC
-
-
构造器详细资料
-
ClientboundPlayerChatPacket
-
ClientboundPlayerChatPacket
public ClientboundPlayerChatPacket(UUID sender, int index, @Nullable MessageSignature signature, SignedMessageBody.Packed body, @Nullable Component unsignedContent, FilterMask filterMask, ChatType.Bound chatType) 创建ClientboundPlayerChatPacket
记录类的实例。- 参数:
sender
-sender
记录组件的值index
-index
记录组件的值signature
-signature
记录组件的值body
-body
记录组件的值unsignedContent
-unsignedContent
记录组件的值filterMask
-filterMask
记录组件的值chatType
-chatType
记录组件的值
-
-
方法详细资料
-
write
-
type
- 指定者:
type
在接口中Packet<ClientGamePacketListener>
-
handle
- 指定者:
handle
在接口中Packet<ClientGamePacketListener>
-
isSkippable
public boolean isSkippable()- 指定者:
isSkippable
在接口中Packet<ClientGamePacketListener>
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
sender
返回sender
记录组件的值。- 返回:
sender
记录组件的值
-
index
public int index()返回index
记录组件的值。- 返回:
index
记录组件的值
-
signature
返回signature
记录组件的值。- 返回:
signature
记录组件的值
-
body
返回body
记录组件的值。- 返回:
body
记录组件的值
-
unsignedContent
返回unsignedContent
记录组件的值。- 返回:
unsignedContent
记录组件的值
-
filterMask
返回filterMask
记录组件的值。- 返回:
filterMask
记录组件的值
-
chatType
返回chatType
记录组件的值。- 返回:
chatType
记录组件的值
-