Package baritone.api.command.datatypes
Interface IDatatype
- All Known Subinterfaces:
IDatatypeFor<T>,IDatatypePost<T,O>
- All Known Implementing Classes:
BlockById,EntityClassById,ForAxis,ForBlockOptionalMeta,ForDirection,ForWaypoints,ItemById,NearbyPlayer,RelativeBlockPos,RelativeCoordinate,RelativeFile,RelativeGoal,RelativeGoalBlock,RelativeGoalXZ,RelativeGoalYLevel
public interface IDatatype
An
IDatatype is similar to an IArgParser in the sense that it is capable of consuming an argument
to transform it into a usable form as the code desires.
A fundamental difference is that an IDatatype is capable of consuming multiple arguments. For example,
RelativeBlockPos is an IDatatypePost which requires at least 3 RelativeCoordinate arguments
to be specified.
Another difference is that an IDatatype can be tab-completed, providing comprehensive auto completion
that can substitute based on existing input or provide possibilities for the next piece of input.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAttempts to complete missing or partial input provided through theIArgConsumer} provided byIDatatypeContext.getConsumer()in order to aide the user in executing commands.
-
Method Details
-
tabComplete
Attempts 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.- 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:
-