Class TagArgument<T>
java.lang.Object
net.darkhax.bookshelf.common.api.commands.args.TagArgument<T>
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.minecraft.tags.TagKey<T>>
public class TagArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<net.minecraft.tags.TagKey<T>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArgumentSerializer<TagArgument<?>, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TagArgument<T> arg(net.minecraft.commands.CommandBuildContext context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry) static <T> net.minecraft.tags.TagKey<T> get(String argName, com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) net.minecraft.tags.TagKey<T> parse(com.mojang.brigadier.StringReader reader) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
parse
-
Field Details
-
SERIALIZER
public static final ArgumentSerializer<TagArgument<?>,net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>>> SERIALIZER
-
-
Method Details
-
parse
public net.minecraft.tags.TagKey<T> parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<T>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
arg
public static <T> TagArgument<T> arg(net.minecraft.commands.CommandBuildContext context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry) -
get
public static <T> net.minecraft.tags.TagKey<T> get(String argName, com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registry)
-