Class ExtentHeightCacher

All Implemented Interfaces:
Extent, InputExtent, OutputExtent

public class ExtentHeightCacher extends PassthroughExtent
  • Constructor Details

    • ExtentHeightCacher

      public ExtentHeightCacher(Extent extent)
  • Method Details

    • reset

      public void reset()
    • getNearestSurfaceTerrainBlock

      public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY)
      Description copied from interface: Extent
      Gets y value for the nearest block that is considered the surface of the terrain (cave roof/floor, mountain surface, etc). Searches in the x,z column given.
      Specified by:
      getNearestSurfaceTerrainBlock in interface Extent
      Overrides:
      getNearestSurfaceTerrainBlock in class PassthroughExtent
      Parameters:
      x - column x
      z - column z
      y - start y
      minY - minimum y height to consider. Inclusive.
      maxY - maximum y height to consider. Inclusive.
      Returns:
      The y value of the nearest terrain block