Record Class ClientboundCommandSuggestionsPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundCommandSuggestionsPacket(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions)
extends Record
implements Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.private final intThe field for thelengthrecord component.private final intThe field for thestartrecord component.private final List<ClientboundCommandSuggestionsPacket.Entry> The field for thesuggestionsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundCommandSuggestionsPacket(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions) Creates an instance of aClientboundCommandSuggestionsPacketrecord class.ClientboundCommandSuggestionsPacket(int id, com.mojang.brigadier.suggestion.Suggestions suggestions) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the NetHandler for processing.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intlength()Returns the value of thelengthrecord component.intstart()Returns the value of thestartrecord component.Returns the value of thesuggestionsrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.brigadier.suggestion.Suggestionstype()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theidrecord component. -
start
private final int startThe field for thestartrecord component. -
length
private final int lengthThe field for thelengthrecord component. -
suggestions
The field for thesuggestionsrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundCommandSuggestionsPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundCommandSuggestionsPacket
public ClientboundCommandSuggestionsPacket(int id, com.mojang.brigadier.suggestion.Suggestions suggestions) -
ClientboundCommandSuggestionsPacket
public ClientboundCommandSuggestionsPacket(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions) Creates an instance of aClientboundCommandSuggestionsPacketrecord class.- Parameters:
id- the value for theidrecord componentstart- the value for thestartrecord componentlength- the value for thelengthrecord componentsuggestions- the value for thesuggestionsrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
toSuggestions
public com.mojang.brigadier.suggestion.Suggestions toSuggestions() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
length
public int length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
suggestions
Returns the value of thesuggestionsrecord component.- Returns:
- the value of the
suggestionsrecord component
-