Record Class ClientboundCommandsPacket.ArgumentNodeStub
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundCommandsPacket.ArgumentNodeStub
- All Implemented Interfaces:
ClientboundCommandsPacket.NodeStub
- Enclosing class:
ClientboundCommandsPacket
static record ClientboundCommandsPacket.ArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable ResourceLocation suggestionId)
extends Record
implements ClientboundCommandsPacket.NodeStub
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArgumentTypeInfo.Template
<?> The field for theargumentType
record component.private final String
The field for theid
record component.private final ResourceLocation
The field for thesuggestionId
record component. -
Constructor Summary
ConstructorsConstructorDescriptionArgumentNodeStub
(String id, ArgumentTypeInfo.Template<?> argumentType, ResourceLocation suggestionId) Creates an instance of aArgumentNodeStub
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentType
record component.<S> com.mojang.brigadier.builder.ArgumentBuilder
<S, ?> build
(CommandBuildContext p_237656_, ClientboundCommandsPacket.NodeBuilder<S> p_426292_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>>
voidserializeCap
(FriendlyByteBuf pBuffer, ArgumentTypeInfo.Template<A> pArgumentInfoTemplate) private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,
T extends ArgumentTypeInfo.Template<A>>
voidserializeCap
(FriendlyByteBuf pBuffer, ArgumentTypeInfo<A, T> pArgumentInfo, ArgumentTypeInfo.Template<A> pArgumentInfoTemplate) Returns the value of thesuggestionId
record component.final String
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf pBuffer)
-
Field Details
-
id
The field for theid
record component. -
argumentType
The field for theargumentType
record component. -
suggestionId
The field for thesuggestionId
record component.
-
-
Constructor Details
-
ArgumentNodeStub
ArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable ResourceLocation suggestionId) Creates an instance of aArgumentNodeStub
record class.- Parameters:
id
- the value for theid
record componentargumentType
- the value for theargumentType
record componentsuggestionId
- the value for thesuggestionId
record component
-
-
Method Details
-
build
public <S> com.mojang.brigadier.builder.ArgumentBuilder<S,?> build(CommandBuildContext p_237656_, ClientboundCommandsPacket.NodeBuilder<S> p_426292_) - Specified by:
build
in interfaceClientboundCommandsPacket.NodeStub
-
write
- Specified by:
write
in interfaceClientboundCommandsPacket.NodeStub
-
serializeCap
private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>> void serializeCap(FriendlyByteBuf pBuffer, ArgumentTypeInfo.Template<A> pArgumentInfoTemplate) -
serializeCap
private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,T extends ArgumentTypeInfo.Template<A>> void serializeCap(FriendlyByteBuf pBuffer, ArgumentTypeInfo<A, T> pArgumentInfo, ArgumentTypeInfo.Template<A> pArgumentInfoTemplate) -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
argumentType
Returns the value of theargumentType
record component.- Returns:
- the value of the
argumentType
record component
-
suggestionId
Returns the value of thesuggestionId
record component.- Returns:
- the value of the
suggestionId
record component
-