/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.mojang.brigadier.StringReader * com.mojang.brigadier.arguments.ArgumentType * com.mojang.brigadier.context.CommandContext * com.mojang.brigadier.exceptions.CommandSyntaxException * com.mojang.brigadier.suggestion.Suggestions * com.mojang.brigadier.suggestion.SuggestionsBuilder */ package net.minecraft.util.parsing.packrat.commands; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.arguments.ArgumentType; import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; import java.util.concurrent.CompletableFuture; import net.minecraft.util.parsing.packrat.commands.CommandArgumentParser; public abstract class ParserBasedArgument implements ArgumentType { private final CommandArgumentParser parser; public ParserBasedArgument(CommandArgumentParser parser) { this.parser = parser; } public T parse(StringReader reader) throws CommandSyntaxException { return this.parser.parseForCommands(reader); } public CompletableFuture listSuggestions(CommandContext context, SuggestionsBuilder builder) { return this.parser.parseForSuggestions(builder); } }