Package net.frozenblock.lib.tag.api
Class TagKeyArgument<T>
java.lang.Object
net.frozenblock.lib.tag.api.TagKeyArgument<T>
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>>
public class TagKeyArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTagKeyArgument(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>getTagKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argument, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, com.mojang.brigadier.exceptions.DynamicCommandExceptionType dynamicCommandExceptionType) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> commandContext, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) net.frozenblock.lib.tag.api.TagKeyArgument.Result<T>parse(com.mojang.brigadier.StringReader reader) static <T> TagKeyArgument<T>tagKey(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
-
Constructor Details
-
TagKeyArgument
public TagKeyArgument(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey)
-
-
Method Details
-
tagKey
public static <T> TagKeyArgument<T> tagKey(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey) -
getTagKey
public static <T> net.frozenblock.lib.tag.api.TagKeyArgument.Result<T> getTagKey(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argument, net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, com.mojang.brigadier.exceptions.DynamicCommandExceptionType dynamicCommandExceptionType) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public net.frozenblock.lib.tag.api.TagKeyArgument.Result<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> commandContext, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) - Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<T>
-