net.minecraft.commands.arguments

public class ResourceOrIdArgument<T>

implements com.mojang.brigadier.arguments.ArgumentType<Holder<T>>

fo
net.minecraft.commands.arguments.ResourceOrIdArgument
net.minecraft.class_9433
net.minecraft.command.argument.RegistryEntryArgumentType
net.minecraft.src.C_313558_

Field summary

Modifier and TypeField
private static final Collection<String>
d
EXAMPLES
field_50038
EXAMPLES
f_316926_
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
a
ERROR_FAILED_TO_PARSE
field_50037
FAILED_TO_PARSE_EXCEPTION
f_315623_
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
b
ERROR_NO_SUCH_ELEMENT
field_60428
NO_SUCH_ELEMENT_EXCEPTION
f_399547_
public static final com.mojang.serialization.DynamicOps<Tag>
c
OPS
field_60429
OPS
f_399671_
private final HolderLookup$Provider
e
registryLookup
field_50040
registries
f_315523_
private final Optional<? extends HolderLookup$RegistryLookup<T>>
f
elementLookup
field_60430
registry
f_399298_
private final com.mojang.serialization.Codec<T>
g
codec
field_50042
entryCodec
f_315174_
private final Grammar<ResourceOrIdArgument$Result<T, Tag>>
h
grammar
field_60431
parser
f_398725_
private final ResourceKey<? extends Registry<T>>
i
registryKey
field_60673
registryRef
f_400386_

Constructor summary

ModifierConstructor
protected (CommandBuildContext registryAccess, ResourceKey<? extends Registry<T>> registry, com.mojang.serialization.Codec<T> entryCodec)

Method summary

Modifier and TypeMethod
public static <T, O> Grammar<ResourceOrIdArgument$Result<T, O>>
a(amd<? extends jy<T>> arg0, com.mojang.serialization.DynamicOps<O> arg1)
createGrammar(ResourceKey<? extends Registry<T>> arg0, com.mojang.serialization.DynamicOps<O> arg1)
method_71495(class_5321<? extends class_2378<T>> arg0, com.mojang.serialization.DynamicOps<O> arg1)
createParser(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.DynamicOps<O> ops)
m_401598_(C_5264_<? extends C_4705_<T>> p_406976_, com.mojang.serialization.DynamicOps<O> p_407708_)
public static ResourceOrIdArgument$LootTableArgument
a(eg arg0)
lootTable(CommandBuildContext arg0)
method_58482(class_7157 arg0)
lootTable(CommandRegistryAccess registryAccess)
m_324396_(C_213173_ p_329328_)
public static Holder<LootTable>
a(com.mojang.brigadier.context.CommandContext<ek> arg0, String arg1)
getLootTable(com.mojang.brigadier.context.CommandContext<CommandSourceStack> arg0, String arg1)
method_58481(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootTable(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
m_319428_(com.mojang.brigadier.context.CommandContext<C_2969_> p_335148_, String p_329251_)
public static ResourceOrIdArgument$LootModifierArgument
b(eg arg0)
lootModifier(CommandBuildContext arg0)
method_58486(class_7157 arg0)
lootFunction(CommandRegistryAccess registryAccess)
m_321589_(C_213173_ p_329720_)
public static Holder<LootItemFunction>
b(com.mojang.brigadier.context.CommandContext<ek> arg0, String arg1)
getLootModifier(com.mojang.brigadier.context.CommandContext<CommandSourceStack> arg0, String arg1)
method_58485(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootFunction(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
m_320065_(com.mojang.brigadier.context.CommandContext<C_2969_> p_334458_, String p_330525_)
public static ResourceOrIdArgument$LootPredicateArgument
c(eg arg0)
lootPredicate(CommandBuildContext arg0)
method_58489(class_7157 arg0)
lootCondition(CommandRegistryAccess registryAccess)
m_324190_(C_213173_ p_330159_)
public static Holder<LootItemCondition>
c(com.mojang.brigadier.context.CommandContext<ek> arg0, String arg1)
getLootPredicate(com.mojang.brigadier.context.CommandContext<CommandSourceStack> arg0, String arg1)
method_58488(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
m_323980_(com.mojang.brigadier.context.CommandContext<C_2969_> p_335366_, String p_334649_)
public static ResourceOrIdArgument$DialogArgument
d(eg arg0)
dialog(CommandBuildContext arg0)
method_71780(class_7157 arg0)
dialog(CommandRegistryAccess registryAccess)
m_404047_(C_213173_ p_409305_)
public static Holder<Dialog>
d(com.mojang.brigadier.context.CommandContext<ek> arg0, String arg1)
getDialog(com.mojang.brigadier.context.CommandContext<CommandSourceStack> arg0, String arg1)
method_71779(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getDialog(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
m_403804_(com.mojang.brigadier.context.CommandContext<C_2969_> p_407444_, String p_407109_)
private static <T> Holder<T>
e(com.mojang.brigadier.context.CommandContext<ek> arg0, String arg1)
getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> arg0, String arg1)
method_58490(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
m_323671_(com.mojang.brigadier.context.CommandContext<C_2969_> p_328476_, String p_329877_)
public Holder<T>
a(com.mojang.brigadier.StringReader arg0)
parse(com.mojang.brigadier.StringReader arg0)
method_58479(com.mojang.brigadier.StringReader arg0)
parse(com.mojang.brigadier.StringReader arg0)
parse(com.mojang.brigadier.StringReader arg0)
private <O> Holder<T>
a(com.mojang.brigadier.StringReader arg0, bsx<fo$g<T, O>> arg1, com.mojang.serialization.DynamicOps<O> arg2)
parse(com.mojang.brigadier.StringReader arg0, Grammar<ResourceOrIdArgument$Result<T, O>> arg1, com.mojang.serialization.DynamicOps<O> arg2)
method_68814(com.mojang.brigadier.StringReader arg0, class_9408<class_9433$class_11382<T, O>> arg1, com.mojang.serialization.DynamicOps<O> arg2)
parse(com.mojang.brigadier.StringReader reader, PackratParser<RegistryEntryArgumentType$EntryParser<T, O>> parser, com.mojang.serialization.DynamicOps<O> ops)
m_387504_(com.mojang.brigadier.StringReader p_406421_, C_313590_<C_313558_$C_398369_<T, O>> p_406083_, com.mojang.serialization.DynamicOps<O> arg2)
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
listSuggestions(com.mojang.brigadier.context.CommandContext<S> arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1)
listSuggestions(com.mojang.brigadier.context.CommandContext<S> arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1)
listSuggestions(com.mojang.brigadier.context.CommandContext<S> arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1)
listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_406812_, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1)
public Collection<String>
getExamples()
getExamples()
getExamples()