类 ResourceOrIdArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceOrIdArgument<T>
- 所有已实现的接口:
com.mojang.brigadier.arguments.ArgumentType<Holder<T>>
- 直接已知子类:
ResourceOrIdArgument.LootModifierArgument
,ResourceOrIdArgument.LootPredicateArgument
,ResourceOrIdArgument.LootTableArgument
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static class
static class
-
字段概要
字段修饰符和类型字段说明static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final Collection
<String> private final boolean
private final HolderLookup.Provider
-
构造器概要
构造器限定符构造器说明protected
ResourceOrIdArgument
(CommandBuildContext p_334973_, ResourceKey<Registry<T>> p_336087_, com.mojang.serialization.Codec<Holder<T>> p_332112_) -
方法概要
修饰符和类型方法说明static Holder
<LootItemFunction> getLootModifier
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_334458_, String p_330525_) static Holder
<LootItemCondition> getLootPredicate
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335366_, String p_334649_) getLootTable
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335148_, String p_329251_) private static <T> Holder
<T> getResource
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_328476_, String p_329877_) private static boolean
hasConsumedWholeArg
(com.mojang.brigadier.StringReader p_330624_) lootModifier
(CommandBuildContext p_329720_) lootPredicate
(CommandBuildContext p_330159_) lootTable
(CommandBuildContext p_329328_) parse
(com.mojang.brigadier.StringReader p_330381_) (专用程序包) static Tag
parseInlineOrId
(com.mojang.brigadier.StringReader p_331361_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.mojang.brigadier.arguments.ArgumentType
listSuggestions, parse
-
字段详细资料
-
EXAMPLES
-
ERROR_FAILED_TO_PARSE
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_FAILED_TO_PARSE -
ERROR_INVALID
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID -
registryLookup
-
hasRegistry
private final boolean hasRegistry -
codec
-
-
构造器详细资料
-
ResourceOrIdArgument
protected ResourceOrIdArgument(CommandBuildContext p_334973_, ResourceKey<Registry<T>> p_336087_, com.mojang.serialization.Codec<Holder<T>> p_332112_)
-
-
方法详细资料
-
lootTable
-
getLootTable
public static Holder<LootTable> getLootTable(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335148_, String p_329251_) 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_334458_, String p_330525_) -
lootPredicate
public static ResourceOrIdArgument.LootPredicateArgument lootPredicate(CommandBuildContext p_330159_) -
getLootPredicate
public static Holder<LootItemCondition> getLootPredicate(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_335366_, String p_334649_) -
getResource
private static <T> Holder<T> getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_328476_, String p_329877_) -
parse
@Nullable public Holder<T> parse(com.mojang.brigadier.StringReader p_330381_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 指定者:
parse
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parseInlineOrId
static Tag parseInlineOrId(com.mojang.brigadier.StringReader p_331361_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
hasConsumedWholeArg
private static boolean hasConsumedWholeArg(com.mojang.brigadier.StringReader p_330624_) -
getExamples
- 指定者:
getExamples
在接口中com.mojang.brigadier.arguments.ArgumentType<T>
-