Class RegistryArgumentType
java.lang.Object
dev.upcraft.sparkweave.api.command.argument.RegistryArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.minecraft.resources.ResourceLocation>
public class RegistryArgumentType
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<net.minecraft.resources.ResourceLocation>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> net.minecraft.core.Registry<T> getRegistry(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String name) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) net.minecraft.resources.ResourceLocationparse(com.mojang.brigadier.StringReader reader) static RegistryArgumentTyperegistry()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
parse
-
Constructor Details
-
RegistryArgumentType
public RegistryArgumentType()
-
-
Method Details
-
registry
-
getRegistry
public static <T> net.minecraft.core.Registry<T> getRegistry(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String name) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public net.minecraft.resources.ResourceLocation parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<net.minecraft.resources.ResourceLocation>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<net.minecraft.resources.ResourceLocation>
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<net.minecraft.resources.ResourceLocation>
-