Interface IDatatypePost<T,O>

All Superinterfaces:
IDatatype
All Known Implementing Classes:
RelativeBlockPos, RelativeCoordinate, RelativeFile, RelativeGoal, RelativeGoalBlock, RelativeGoalXZ, RelativeGoalYLevel

public interface IDatatypePost<T,O> extends IDatatype
An IDatatype which acts as a Function, in essence. The only difference is that it requires an IDatatypeContext to be provided due to the expectation that implementations of IDatatype are singletons.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(IDatatypeContext ctx, O original)
    Takes the expected input and transforms it based on the value held by original.

    Methods inherited from interface baritone.api.command.datatypes.IDatatype

    tabComplete
  • Method Details

    • apply

      T apply(IDatatypeContext ctx, O original) throws CommandException
      Takes the expected input and transforms it based on the value held by 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.
      Parameters:
      ctx - The datatype context
      original - The transformable value
      Returns:
      The transformed value
      Throws:
      CommandException