public enum RelativeGoalYLevel extends java.lang.Enum<RelativeGoalYLevel> implements IDatatypePost<GoalYLevel,BetterBlockPos>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
GoalYLevel |
apply(IDatatypeContext ctx,
BetterBlockPos origin)
Takes the expected input and transforms it based on the value held by
original . |
java.util.stream.Stream<java.lang.String> |
tabComplete(IDatatypeContext ctx)
Attempts to complete missing or partial input provided through the
IArgConsumer } provided by
IDatatypeContext.getConsumer() in order to aide the user in executing commands. |
static RelativeGoalYLevel |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RelativeGoalYLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RelativeGoalYLevel INSTANCE
public static RelativeGoalYLevel[] values()
for (RelativeGoalYLevel c : RelativeGoalYLevel.values()) System.out.println(c);
public static RelativeGoalYLevel valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic GoalYLevel apply(IDatatypeContext ctx, BetterBlockPos origin) throws CommandException
IDatatypePost
original
. If original
is null, it is expected that the implementation of this method has a case to handle it, such that a
NullPointerException
will never be thrown as a result.apply
in interface IDatatypePost<GoalYLevel,BetterBlockPos>
ctx
- The datatype contextorigin
- The transformable valueCommandException
public java.util.stream.Stream<java.lang.String> tabComplete(IDatatypeContext ctx)
IDatatype
IArgConsumer
} provided by
IDatatypeContext.getConsumer()
in order to aide the user in executing commands.
One benefit over datatypes over IArgParser
s is that instead of each command trying to guess what values
the datatype will accept, or simply not tab completing at all, datatypes that support tab completion can provide
accurate information using the same methods used to parse arguments in the first place.
tabComplete
in interface IDatatype
ctx
- The argument consumer to tab completeIArgConsumer.tabCompleteDatatype(IDatatype)