Interface LayerFunction

All Known Implementing Classes:
GroundFunction, Naturalizer, SnowSimulator

public interface LayerFunction
A function that takes a position and a depth.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    apply(BlockVector3 position, int depth)
    Apply the function to the given position.
    boolean
    Returns whether the given block should be "passed through" when conducting the ground search.
  • Method Details

    • isGround

      boolean isGround(BlockVector3 position)
      Returns whether the given block should be "passed through" when conducting the ground search.
      Parameters:
      position - return whether the given block is the ground
      Returns:
      true if the search should stop
    • apply

      boolean apply(BlockVector3 position, int depth) throws WorldEditException
      Apply the function to the given position.

      The depth would be the number of blocks from the surface if a LayerVisitor was used.

      Parameters:
      position - the position
      depth - the depth as a number starting from 0
      Returns:
      true whether this method should be called for further layers
      Throws:
      WorldEditException - thrown on an error