Class SnowHeightMap

java.lang.Object
com.sk89q.worldedit.math.convolution.SnowHeightMap

public class SnowHeightMap extends Object
Allows applications of Kernels onto the region's height map for snow layers

Currently only used for snow layer smoothing (with a GaussianKernel)

.
  • Constructor Details

    • SnowHeightMap

      public SnowHeightMap(EditSession session, Region region, @Nullable Mask mask)
      Constructs the SnowHeightMap.
      Parameters:
      session - an edit session
      region - the region
      mask - optional mask for the height map
  • Method Details

    • applyFilter

      public float[] applyFilter(HeightMapFilter filter, int iterations)
      Compute the new heightmap with the filter 'iterations' amount times.
      Parameters:
      filter - the filter
      iterations - the number of iterations
      Returns:
      new generated heightmap of the terrain
    • applyChanges

      public int applyChanges(float[] data, int layerBlocks) throws MaxChangedBlocksException
      Apply a raw heightmap to a region. Use snow layers.
      Parameters:
      data - the data
      layerBlocks - amount of blocks with type SNOW_BLOCK
      Returns:
      number of blocks affected
      Throws:
      MaxChangedBlocksException - if the maximum block change limit is exceeded