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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theid
record component.private final int
The field for thelength
record component.private final int
The field for thestart
record component.private final List
<ClientboundCommandSuggestionsPacket.Entry> The field for thesuggestions
record component. -
Constructor Summary
ConstructorDescriptionClientboundCommandSuggestionsPacket
(int id, int start, int length, List<ClientboundCommandSuggestionsPacket.Entry> suggestions) Creates an instance of aClientboundCommandSuggestionsPacket
record class.ClientboundCommandSuggestionsPacket
(int p_131846_, com.mojang.brigadier.suggestion.Suggestions p_131847_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_131853_) final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.int
length()
Returns the value of thelength
record component.int
start()
Returns the value of thestart
record component.Returns the value of thesuggestions
record component.final String
toString()
Returns a string representation of this record class.com.mojang.brigadier.suggestion.Suggestions
type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theid
record component. -
start
private final int startThe field for thestart
record component. -
length
private final int lengthThe field for thelength
record component. -
suggestions
The field for thesuggestions
record 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 aClientboundCommandSuggestionsPacket
record class.- Parameters:
id
- the value for theid
record componentstart
- the value for thestart
record componentlength
- the value for thelength
record componentsuggestions
- the value for thesuggestions
record component
-
-
Method Details
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in 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 theid
record component.- Returns:
- the value of the
id
record component
-
start
public int start()Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
length
public int length()Returns the value of thelength
record component.- Returns:
- the value of the
length
record component
-
suggestions
Returns the value of thesuggestions
record component.- Returns:
- the value of the
suggestions
record component
-