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 p_131846_, com.mojang.brigadier.suggestion.Suggestions p_131847_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_131853_) 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.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 p_131846_, com.mojang.brigadier.suggestion.Suggestions p_131847_) -
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
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
toSuggestions
public com.mojang.brigadier.suggestion.Suggestions toSuggestions() -
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 '=='. -
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
-