Package net.minecraft.commands.arguments
Class ResourceArgument<T>
java.lang.Object
net.minecraft.commands.arguments.ResourceArgument<T>
- All Implemented Interfaces:
- com.mojang.brigadier.arguments.ArgumentType<Holder.Reference<T>>
public class ResourceArgument<T>
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<Holder.Reference<T>>
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypestatic final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeprivate static final Collection<String>(package private) final ResourceKey<? extends Registry<T>>private final HolderLookup<T>
- 
Constructor SummaryConstructorsConstructorDescriptionResourceArgument(CommandBuildContext p_248597_, ResourceKey<? extends Registry<T>> p_251778_) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic Holder.Reference<Attribute>getAttribute(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248753_, String p_251157_) static Holder.Reference<ConfiguredFeature<?,?>> getConfiguredFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250819_, String p_252256_) static Holder.Reference<Enchantment>getEnchantment(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248656_, String p_248713_) static Holder.Reference<EntityType<?>>getEntityType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251258_, String p_252322_) static Holder.Reference<MobEffect>getMobEffect(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250521_, String p_249927_) static <T> Holder.Reference<T>getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251788_, String p_251996_, ResourceKey<Registry<T>> p_250077_) static Holder.Reference<Structure>getStructure(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250288_, String p_250856_) static Holder.Reference<EntityType<?>>getSummonableEntityType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251880_, String p_250243_) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_249391_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_251197_) parse(com.mojang.brigadier.StringReader p_250909_) static <T> ResourceArgument<T>resource(CommandBuildContext p_249973_, ResourceKey<? extends Registry<T>> p_251405_) 
- 
Field Details- 
EXAMPLES
- 
ERROR_NOT_SUMMONABLE_ENTITYprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NOT_SUMMONABLE_ENTITY
- 
ERROR_UNKNOWN_RESOURCEpublic static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_UNKNOWN_RESOURCE
- 
ERROR_INVALID_RESOURCE_TYPEpublic static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_INVALID_RESOURCE_TYPE
- 
registryKey
- 
registryLookup
 
- 
- 
Constructor Details- 
ResourceArgumentpublic ResourceArgument(CommandBuildContext p_248597_, ResourceKey<? extends Registry<T>> p_251778_) 
 
- 
- 
Method Details- 
resourcepublic static <T> ResourceArgument<T> resource(CommandBuildContext p_249973_, ResourceKey<? extends Registry<T>> p_251405_) 
- 
getResourcepublic static <T> Holder.Reference<T> getResource(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251788_, String p_251996_, ResourceKey<Registry<T>> p_250077_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getAttributepublic static Holder.Reference<Attribute> getAttribute(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248753_, String p_251157_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getConfiguredFeaturepublic static Holder.Reference<ConfiguredFeature<?,?>> getConfiguredFeature(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250819_, String p_252256_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getStructurepublic static Holder.Reference<Structure> getStructure(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250288_, String p_250856_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getEntityTypepublic static Holder.Reference<EntityType<?>> getEntityType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251258_, String p_252322_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getSummonableEntityTypepublic static Holder.Reference<EntityType<?>> getSummonableEntityType(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_251880_, String p_250243_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getMobEffectpublic static Holder.Reference<MobEffect> getMobEffect(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_250521_, String p_249927_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getEnchantmentpublic static Holder.Reference<Enchantment> getEnchantment(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_248656_, String p_248713_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
parsepublic Holder.Reference<T> parse(com.mojang.brigadier.StringReader p_250909_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
- parsein interface- com.mojang.brigadier.arguments.ArgumentType<T>
- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
listSuggestionspublic <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> p_249391_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_251197_) - Specified by:
- listSuggestionsin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
- 
getExamples- Specified by:
- getExamplesin interface- com.mojang.brigadier.arguments.ArgumentType<T>
 
 
-