类 ResourceSelectorArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceSelectorArgument<T>
- 所有已实现的接口:
com.mojang.brigadier.arguments.ArgumentType<Collection<Holder.Reference<T>>>
public class ResourceSelectorArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<Collection<Holder.Reference<T>>>
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final Collection
<String> (专用程序包) final ResourceKey
<? extends Registry<T>> private final HolderLookup
<T> -
构造器概要
构造器构造器说明ResourceSelectorArgument
(CommandBuildContext p_397758_, ResourceKey<? extends Registry<T>> p_397841_) -
方法概要
修饰符和类型方法说明private static String
ensureNamespaced
(String p_397692_) static <T> Collection
<Holder.Reference<T>> getSelectedResources
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_397945_, String p_397186_) private static boolean
isAllowedPatternCharacter
(char p_397389_) <S> CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_397613_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_397790_) private static boolean
matches
(String p_397067_, ResourceLocation p_397052_) parse
(com.mojang.brigadier.StringReader p_397392_) static <T> Collection
<Holder.Reference<T>> parse
(com.mojang.brigadier.StringReader p_397046_, HolderLookup<T> p_397718_) private static String
readPattern
(com.mojang.brigadier.StringReader p_397824_) static <T> ResourceSelectorArgument
<T> resourceSelector
(CommandBuildContext p_397004_, ResourceKey<? extends Registry<T>> p_397925_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.mojang.brigadier.arguments.ArgumentType
parse
-
字段详细资料
-
EXAMPLES
-
ERROR_NO_MATCHES
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_NO_MATCHES -
registryKey
-
registryLookup
-
-
构造器详细资料
-
ResourceSelectorArgument
ResourceSelectorArgument(CommandBuildContext p_397758_, ResourceKey<? extends Registry<T>> p_397841_)
-
-
方法详细资料
-
parse
public Collection<Holder.Reference<T>> parse(com.mojang.brigadier.StringReader p_397392_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 指定者:
parse
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public static <T> Collection<Holder.Reference<T>> parse(com.mojang.brigadier.StringReader p_397046_, HolderLookup<T> p_397718_) -
readPattern
-
isAllowedPatternCharacter
private static boolean isAllowedPatternCharacter(char p_397389_) -
ensureNamespaced
-
matches
-
resourceSelector
public static <T> ResourceSelectorArgument<T> resourceSelector(CommandBuildContext p_397004_, ResourceKey<? extends Registry<T>> p_397925_) -
getSelectedResources
public static <T> Collection<Holder.Reference<T>> getSelectedResources(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_397945_, String p_397186_) -
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_397613_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_397790_) - 指定者:
listSuggestions
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- 指定者:
getExamples
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-