类 ResourceOrTagArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrTagArgument<T>
- 所有已实现的接口:
com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagArgument.Result<T>>
public class ResourceOrTagArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<ResourceOrTagArgument.Result<T>>
-
嵌套类概要
嵌套类修饰符和类型类说明static class
(专用程序包) static final record
static interface
(专用程序包) static final record
-
字段概要
字段修饰符和类型字段说明private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final Collection<String>
(专用程序包) final ResourceKey<? extends Registry<T>>
private final HolderLookup<T>
-
构造器概要
构造器构造器说明ResourceOrTagArgument
(CommandBuildContext pContext, ResourceKey<? extends Registry<T>> pRegistryKey) -
方法概要
修饰符和类型方法说明static <T> ResourceOrTagArgument.Result<T>
getResourceOrTag
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pArgument, ResourceKey<Registry<T>> pRegistryKey) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_250223_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_252354_) parse
(com.mojang.brigadier.StringReader pReader) static <T> ResourceOrTagArgument<T>
resourceOrTag
(CommandBuildContext pContext, ResourceKey<? extends Registry<T>> pRegistryKey)
-
字段详细资料
-
EXAMPLES
-
ERROR_UNKNOWN_TAG
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_UNKNOWN_TAG -
ERROR_INVALID_TAG_TYPE
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_INVALID_TAG_TYPE -
registryLookup
-
registryKey
-
-
构造器详细资料
-
ResourceOrTagArgument
public ResourceOrTagArgument(CommandBuildContext pContext, ResourceKey<? extends Registry<T>> pRegistryKey)
-
-
方法详细资料
-
resourceOrTag
public static <T> ResourceOrTagArgument<T> resourceOrTag(CommandBuildContext pContext, ResourceKey<? extends Registry<T>> pRegistryKey) -
getResourceOrTag
public static <T> ResourceOrTagArgument.Result<T> getResourceOrTag(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pArgument, ResourceKey<Registry<T>> pRegistryKey) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public ResourceOrTagArgument.Result<T> parse(com.mojang.brigadier.StringReader pReader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 指定者:
parse
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_250223_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_252354_) - 指定者:
listSuggestions
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- 指定者:
getExamples
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-