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

Field summary

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

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)
public static ResourceOrIdArgument$LootTableArgument
a(eg arg0)
lootTable(CommandBuildContext arg0)
method_58482(class_7157 arg0)
lootTable(CommandRegistryAccess registryAccess)
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)
public static ResourceOrIdArgument$LootModifierArgument
b(eg arg0)
lootModifier(CommandBuildContext arg0)
method_58486(class_7157 arg0)
lootFunction(CommandRegistryAccess registryAccess)
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)
public static ResourceOrIdArgument$LootPredicateArgument
c(eg arg0)
lootPredicate(CommandBuildContext arg0)
method_58489(class_7157 arg0)
lootCondition(CommandRegistryAccess registryAccess)
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)
public static ResourceOrIdArgument$DialogArgument
d(eg arg0)
dialog(CommandBuildContext arg0)
method_71780(class_7157 arg0)
dialog(CommandRegistryAccess registryAccess)
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)
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)
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)
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)
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)
public Collection<String>
getExamples()
getExamples()