net.minecraft.command.argument

public class RegistryEntryArgumentType<T>

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

net.minecraft.commands.arguments.ResourceOrIdArgument
net.minecraft.class_9433
net.minecraft.command.argument.RegistryEntryArgumentType

Field summary

Modifier and TypeField
static final Collection<String>
EXAMPLES
field_50038
EXAMPLES
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_FAILED_TO_PARSE
field_50037
FAILED_TO_PARSE_EXCEPTION
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
ERROR_NO_SUCH_ELEMENT
field_60428
NO_SUCH_ELEMENT_EXCEPTION
public static final com.mojang.serialization.DynamicOps<NbtElement>
OPS
field_60429
OPS
private final RegistryWrapper$WrapperLookup
registryLookup
field_50040
registries
private final Optional<? extends RegistryWrapper$Impl<T>>
elementLookup
field_60430
registry
private final com.mojang.serialization.Codec<T>
codec
field_50042
entryCodec
private final PackratParser<RegistryEntryArgumentType$EntryParser<T, NbtElement>>
grammar
field_60431
parser
private final RegistryKey<? extends Registry<T>>
registryKey
field_60673
registryRef

Constructor summary

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

Method summary

Modifier and TypeMethod
public static <T, O> PackratParser<RegistryEntryArgumentType$EntryParser<T, O>>
createGrammar(ResourceKey<? extends Registry<T>> registryKey, com.mojang.serialization.DynamicOps<O> ops)
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 RegistryEntryArgumentType$LootTableArgumentType
lootTable(CommandBuildContext context)
method_58482(class_7157 arg0)
lootTable(CommandRegistryAccess registryAccess)
public static RegistryEntry<LootTable>
getLootTable(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name)
method_58481(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootTable(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
public static RegistryEntryArgumentType$LootFunctionArgumentType
lootModifier(CommandBuildContext context)
method_58486(class_7157 arg0)
lootFunction(CommandRegistryAccess registryAccess)
public static RegistryEntry<LootFunction>
getLootModifier(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name)
method_58485(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootFunction(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
public static RegistryEntryArgumentType$LootConditionArgumentType
lootPredicate(CommandBuildContext context)
method_58489(class_7157 arg0)
lootCondition(CommandRegistryAccess registryAccess)
public static RegistryEntry<LootCondition>
getLootPredicate(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name)
method_58488(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getLootCondition(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
public static RegistryEntryArgumentType$DialogArgumentType
dialog(CommandBuildContext context)
method_71780(class_7157 arg0)
dialog(CommandRegistryAccess registryAccess)
public static RegistryEntry<Dialog>
getDialog(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name)
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> RegistryEntry<T>
getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String name)
method_58490(com.mojang.brigadier.context.CommandContext<class_2168> arg0, String arg1)
getArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String argument)
public RegistryEntry<T>
parse(com.mojang.brigadier.StringReader reader)
method_58479(com.mojang.brigadier.StringReader arg0)
parse(com.mojang.brigadier.StringReader arg0)
private <O> RegistryEntry<T>
parse(com.mojang.brigadier.StringReader reader, Grammar<ResourceOrIdArgument$Result<T, O>> grammar, com.mojang.serialization.DynamicOps<O> ops)
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> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
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()
public Object
parse(com.mojang.brigadier.StringReader reader)
private static RegistryEntryArgumentType$EntryParser
lambda$createGrammar$0(Atom arg0, ResourceKey arg1, Atom arg2, Scope arg3)
method_71496(class_9387 arg0, class_5321 arg1, class_9387 arg2, class_9400 arg3)
method_71496(Symbol arg0, RegistryKey arg1, Symbol arg2, ParseResults results)
private static com.mojang.brigadier.Message
lambda$static$1(Object arg0, Object arg1)
method_71497(Object arg0, Object arg1)
method_71497(Object key, Object registryRef)
private static com.mojang.brigadier.Message
lambda$static$0(Object arg0)
method_58483(Object arg0)
method_58483(Object argument)