记录类 ClientboundCommandSuggestionsPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket
- 所有已实现的接口:
Packet<ClientGamePacketListener>
public record ClientboundCommandSuggestionsPacket(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions)
extends Record
implements Packet<ClientGamePacketListener>
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final int
id
记录组件的字段。private final int
length
记录组件的字段。private final int
start
记录组件的字段。private final List
<ClientboundCommandSuggestionsPacket.Entry> suggestions
记录组件的字段。 -
构造器概要
构造器构造器说明ClientboundCommandSuggestionsPacket
(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions) 创建ClientboundCommandSuggestionsPacket
记录类的实例。ClientboundCommandSuggestionsPacket
(int p_131846_, com.mojang.brigadier.suggestion.Suggestions p_131847_) -
方法概要
修饰符和类型方法说明final boolean
指示某个其他对象是否“等于”此对象。void
handle
(ClientGamePacketListener p_131853_) final int
hashCode()
返回此对象的哈希代码值。int
id()
返回id
记录组件的值。int
length()
返回length
记录组件的值。int
start()
返回start
记录组件的值。返回suggestions
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。com.mojang.brigadier.suggestion.Suggestions
type()
从接口继承的方法 net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
字段详细资料
-
id
private final int idid
记录组件的字段。 -
start
private final int startstart
记录组件的字段。 -
length
private final int lengthlength
记录组件的字段。 -
suggestions
suggestions
记录组件的字段。 -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundCommandSuggestionsPacket> STREAM_CODEC
-
-
构造器详细资料
-
ClientboundCommandSuggestionsPacket
public ClientboundCommandSuggestionsPacket(int p_131846_, com.mojang.brigadier.suggestion.Suggestions p_131847_) -
ClientboundCommandSuggestionsPacket
public ClientboundCommandSuggestionsPacket(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions) 创建ClientboundCommandSuggestionsPacket
记录类的实例。- 参数:
id
-id
记录组件的值start
-start
记录组件的值length
-length
记录组件的值suggestions
-suggestions
记录组件的值
-
-
方法详细资料
-
type
- 指定者:
type
在接口中Packet<ClientGamePacketListener>
-
handle
- 指定者:
handle
在接口中Packet<ClientGamePacketListener>
-
toSuggestions
public com.mojang.brigadier.suggestion.Suggestions toSuggestions() -
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
id
public int id()返回id
记录组件的值。- 返回:
id
记录组件的值
-
start
public int start()返回start
记录组件的值。- 返回:
start
记录组件的值
-
length
public int length()返回length
记录组件的值。- 返回:
length
记录组件的值
-
suggestions
返回suggestions
记录组件的值。- 返回:
suggestions
记录组件的值
-