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 Summary
Nested Classes - 
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionResourceArgument(CommandBuildContext p_248597_, ResourceKey<? extends Registry<T>> p_251778_)  - 
Method Summary
Modifier 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_ENTITY
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NOT_SUMMONABLE_ENTITY - 
ERROR_UNKNOWN_RESOURCE
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_UNKNOWN_RESOURCE - 
ERROR_INVALID_RESOURCE_TYPE
public static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_INVALID_RESOURCE_TYPE - 
registryKey
 - 
registryLookup
 
 - 
 - 
Constructor Details
- 
ResourceArgument
public ResourceArgument(CommandBuildContext p_248597_, ResourceKey<? extends Registry<T>> p_251778_)  
 - 
 - 
Method Details
- 
resource
public static <T> ResourceArgument<T> resource(CommandBuildContext p_249973_, ResourceKey<? extends Registry<T>> p_251405_)  - 
getResource
public 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
 - 
getAttribute
public 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
 - 
getConfiguredFeature
public 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
 - 
getStructure
public 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
 - 
getEntityType
public 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
 - 
getSummonableEntityType
public 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
 - 
getMobEffect
public 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
 - 
getEnchantment
public 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
 - 
parse
public Holder.Reference<T> parse(com.mojang.brigadier.StringReader p_250909_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
 parsein interfacecom.mojang.brigadier.arguments.ArgumentType<T>- Throws:
 com.mojang.brigadier.exceptions.CommandSyntaxException
 - 
listSuggestions
public <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 interfacecom.mojang.brigadier.arguments.ArgumentType<T>
 - 
getExamples
- Specified by:
 getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<T>
 
 -