Class DownwardVisitor

All Implemented Interfaces:
Operation

public class DownwardVisitor extends RecursiveVisitor
Visits adjacent points on the same X-Z plane as long as the points pass the given mask, and then executes the provided region function on the entire column.

This is used by //fill.

  • Constructor Details

    • DownwardVisitor

      public DownwardVisitor(Mask mask, RegionFunction function, int baseY)
      Create a new visitor.
      Parameters:
      mask - the mask
      function - the function
      baseY - the base Y
  • Method Details

    • isVisitable

      protected boolean isVisitable(BlockVector3 from, BlockVector3 to)
      Description copied from class: BreadthFirstSearch
      Return whether the given 'to' block should be visited, starting from the 'from' block.
      Overrides:
      isVisitable in class RecursiveVisitor
      Parameters:
      from - the origin block
      to - the block under question
      Returns:
      true if the 'to' block should be visited