Class AxisParser<C>
java.lang.Object
org.incendo.cloud.brigadier.parser.WrappedBrigadierParser<C,EnumSet<net.minecraft.core.Direction.Axis>>
org.incendo.cloud.minecraft.modded.parser.AxisParser<C>
- Type Parameters:
C- the sender type
- All Implemented Interfaces:
ArgumentParser<C,,EnumSet<net.minecraft.core.Direction.Axis>> SuggestionProvider<C>,SuggestionProviderHolder<C>
public final class AxisParser<C>
extends WrappedBrigadierParser<C,EnumSet<net.minecraft.core.Direction.Axis>>
An argument parser for a set of
axes, described in Vanilla as a "swizzle".-
Nested Class Summary
Nested classes/interfaces inherited from class org.incendo.cloud.brigadier.parser.WrappedBrigadierParser
WrappedBrigadierParser.ParseFunction<T>Nested classes/interfaces inherited from interface org.incendo.cloud.parser.ArgumentParser
ArgumentParser.FutureArgumentParser<C,T> -
Field Summary
Fields inherited from class org.incendo.cloud.brigadier.parser.WrappedBrigadierParser
COMMAND_CONTEXT_BRIGADIER_NATIVE_SENDER -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull CommandComponent.Builder<C, EnumSet<net.minecraft.core.Direction.Axis>> Returns aCommandComponent.BuilderusingaxisParser()as the parser.static <C> @NonNull ParserDescriptor<C, EnumSet<net.minecraft.core.Direction.Axis>> Creates a new axis parser.Methods inherited from class org.incendo.cloud.brigadier.parser.WrappedBrigadierParser
nativeArgumentType, parse, suggestionsFutureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.parser.ArgumentParser
flatMap, flatMapSuccess, mapSuccess, parseFuture, suggestionProvider
-
Method Details
-
axisParser
public static <C> @NonNull ParserDescriptor<C,EnumSet<net.minecraft.core.Direction.Axis>> axisParser()Creates a new axis parser.- Type Parameters:
C- command sender type- Returns:
- the created parser
-
axisComponent
public static <C> @NonNull CommandComponent.Builder<C,EnumSet<net.minecraft.core.Direction.Axis>> axisComponent()Returns aCommandComponent.BuilderusingaxisParser()as the parser.- Type Parameters:
C- the command sender type- Returns:
- the component builder
-