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 theargumentTyperecord component.private final StringThe field for theidrecord component.private final ResourceLocationThe field for thesuggestionIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, ResourceLocation 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 p_237656_, ClientboundCommandsPacket.NodeBuilder<S> p_426292_) 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 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 thesuggestionIdrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_237658_)
-
Field Details
-
id
The field for theidrecord component. -
argumentType
The field for theargumentTyperecord component. -
suggestionId
The field for thesuggestionIdrecord component.
-
-
Constructor Details
-
ArgumentNodeStub
ArgumentNodeStub(String id, ArgumentTypeInfo.Template<?> argumentType, @Nullable ResourceLocation 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 p_237656_, ClientboundCommandsPacket.NodeBuilder<S> p_426292_) - Specified by:
buildin interfaceClientboundCommandsPacket.NodeStub
-
write
- Specified by:
writein 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 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
-