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
private static record ClientboundCommandsPacket.ArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable Identifier suggestionId)
extends Record
implements ClientboundCommandsPacket.NodeStub
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArgumentTypeInfo.Template<?> The field for theargumentTyperecord component.private final StringThe field for theidrecord component.private final @Nullable IdentifierThe field for thesuggestionIdrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable Identifier suggestionId) Creates an instance of aArgumentNodeStubrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentTyperecord component.<S> com.mojang.brigadier.builder.ArgumentBuilder<S, ?> build(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>>
voidserializeCap(FriendlyByteBuf output, ArgumentTypeInfo.Template<A> argumentType) private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends ArgumentTypeInfo.Template<A>>
voidserializeCap(FriendlyByteBuf output, ArgumentTypeInfo<A, T> info, ArgumentTypeInfo.Template<A> argumentType) @Nullable IdentifierReturns the value of thesuggestionIdrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf output)
-
Field Details
-
id
The field for theidrecord component. -
argumentType
The field for theargumentTyperecord component. -
suggestionId
The field for thesuggestionIdrecord component.
-
-
Constructor Details
-
ArgumentNodeStub
private ArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable Identifier suggestionId) Creates an instance of aArgumentNodeStubrecord class.- Parameters:
id- the value for theidrecord componentargumentType- the value for theargumentTyperecord componentsuggestionId- the value for thesuggestionIdrecord component
-
-
Method Details
-
build
public <S> com.mojang.brigadier.builder.ArgumentBuilder<S,?> build(CommandBuildContext context, ClientboundCommandsPacket.NodeBuilder<S> builder) - Specified by:
buildin interfaceClientboundCommandsPacket.NodeStub
-
write
- Specified by:
writein interfaceClientboundCommandsPacket.NodeStub
-
serializeCap
private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>> void serializeCap(FriendlyByteBuf output, ArgumentTypeInfo.Template<A> argumentType) -
serializeCap
private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends ArgumentTypeInfo.Template<A>> void serializeCap(FriendlyByteBuf output, ArgumentTypeInfo<A, T> info, ArgumentTypeInfo.Template<A> argumentType) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
argumentType
Returns the value of theargumentTyperecord component.- Returns:
- the value of the
argumentTyperecord component
-
suggestionId
Returns the value of thesuggestionIdrecord component.- Returns:
- the value of the
suggestionIdrecord component
-