Package baritone.api.command.datatypes
Enum Class ForDirection
- All Implemented Interfaces:
IDatatype,IDatatypeFor<net.minecraft.core.Direction>,Serializable,Comparable<ForDirection>,Constable
public enum ForDirection
extends Enum<ForDirection>
implements IDatatypeFor<net.minecraft.core.Direction>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Directionget(IDatatypeContext ctx) Consumes the desired amount of arguments from the specifiedIDatatypeContext, and then returns the parsed value.Attempts to complete missing or partial input provided through theIArgConsumer} provided byIDatatypeContext.getConsumer()in order to aide the user in executing commands.static ForDirectionReturns the enum constant of this class with the specified name.static ForDirection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
get
Description copied from interface:IDatatypeForConsumes the desired amount of arguments from the specifiedIDatatypeContext, and then returns the parsed value. This method will more than likely return aIllegalArgumentExceptionif the expected input does not conform to a parseable value. As far as aCommandExceptionbeing thrown is concerned, see the note below for specifics.- Specified by:
getin interfaceIDatatypeFor<net.minecraft.core.Direction>- Parameters:
ctx- The context- Returns:
- The parsed data-type
- Throws:
CommandException- If there was an issue parsing using another type or arguments could not be polled.- See Also:
-
tabComplete
Description copied from interface:IDatatypeAttempts to complete missing or partial input provided through theIArgConsumer} provided byIDatatypeContext.getConsumer()in order to aide the user in executing commands.One benefit over datatypes over
IArgParsers 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.- Specified by:
tabCompletein interfaceIDatatype- Parameters:
ctx- The argument consumer to tab complete- Returns:
- A stream representing the strings that can be tab completed. DO NOT INCLUDE SPACES IN ANY STRINGS.
- Throws:
CommandException- See Also:
-