类 ResourceOrIdArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrIdArgument<T>
- 所有已实现的接口:
com.mojang.brigadier.arguments.ArgumentType<Holder<T>>
- 直接已知子类:
ResourceOrIdArgument.DialogArgument
,ResourceOrIdArgument.LootModifierArgument
,ResourceOrIdArgument.LootPredicateArgument
,ResourceOrIdArgument.LootTableArgument
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static final record
static class
static class
static class
static final record
static interface
-
字段概要
字段修饰符和类型字段说明private final com.mojang.serialization.Codec
<T> private final Optional
<? extends HolderLookup.RegistryLookup<T>> static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final Collection
<String> private final Grammar
<ResourceOrIdArgument.Result<T, Tag>> static final com.mojang.serialization.DynamicOps
<Tag> private final ResourceKey
<? extends Registry<T>> private final HolderLookup.Provider
-
构造器概要
构造器限定符构造器说明protected
ResourceOrIdArgument
(CommandBuildContext p_335864_, ResourceKey<? extends Registry<T>> p_335475_, com.mojang.serialization.Codec<T> p_335632_) -
方法概要
修饰符和类型方法说明static <T,
O> Grammar <ResourceOrIdArgument.Result<T, O>> createGrammar
(ResourceKey<? extends Registry<T>> p_422103_, com.mojang.serialization.DynamicOps<O> p_421543_) dialog
(CommandBuildContext p_425646_) getDialog
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_426065_, String p_426142_) static Holder
<LootItemFunction> getLootModifier
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335678_, String p_336178_) static Holder
<LootItemCondition> getLootPredicate
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_336183_, String p_336098_) getLootTable
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335373_, String p_336017_) private static <T> Holder
<T> getResource
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_336122_, String p_335417_) <S> CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> listSuggestions
(com.mojang.brigadier.context.CommandContext<S> p_425917_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_425995_) lootModifier
(CommandBuildContext p_335731_) lootPredicate
(CommandBuildContext p_335891_) lootTable
(CommandBuildContext p_335938_) parse
(com.mojang.brigadier.StringReader p_335906_) parse
(com.mojang.brigadier.StringReader p_412491_, Grammar<ResourceOrIdArgument.Result<T, O>> p_421894_, com.mojang.serialization.DynamicOps<O> p_421523_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.mojang.brigadier.arguments.ArgumentType
parse
-
字段详细资料
-
EXAMPLES
-
ERROR_FAILED_TO_PARSE
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_FAILED_TO_PARSE -
ERROR_NO_SUCH_ELEMENT
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_NO_SUCH_ELEMENT -
OPS
-
registryLookup
-
elementLookup
-
codec
-
grammar
-
registryKey
-
-
构造器详细资料
-
ResourceOrIdArgument
protected ResourceOrIdArgument(CommandBuildContext p_335864_, ResourceKey<? extends Registry<T>> p_335475_, com.mojang.serialization.Codec<T> p_335632_)
-
-
方法详细资料
-
createGrammar
public static <T,O> Grammar<ResourceOrIdArgument.Result<T,O>> createGrammar(ResourceKey<? extends Registry<T>> p_422103_, com.mojang.serialization.DynamicOps<O> p_421543_) -
lootTable
-
getLootTable
public static Holder<LootTable> getLootTable(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335373_, String p_336017_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
lootModifier
-
getLootModifier
public static Holder<LootItemFunction> getLootModifier(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335678_, String p_336178_) -
lootPredicate
public static ResourceOrIdArgument.LootPredicateArgument lootPredicate(CommandBuildContext p_335891_) -
getLootPredicate
public static Holder<LootItemCondition> getLootPredicate(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_336183_, String p_336098_) -
dialog
-
getDialog
public static Holder<Dialog> getDialog(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_426065_, String p_426142_) -
getResource
private static <T> Holder<T> getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_336122_, String p_335417_) -
parse
@Nullable public Holder<T> parse(com.mojang.brigadier.StringReader p_335906_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 指定者:
parse
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
@Nullable private <O> Holder<T> parse(com.mojang.brigadier.StringReader p_412491_, Grammar<ResourceOrIdArgument.Result<T, O>> p_421894_, com.mojang.serialization.DynamicOps<O> p_421523_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_425917_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_425995_) - 指定者:
listSuggestions
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-
getExamples
- 指定者:
getExamples
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-