Interface NoiseTerrain


public interface NoiseTerrain
The land a world grows from its noise settings and its seed: the shape of the ground and of the seas, the biomes, the caves carved through them, then the ores, plants and trees laid over it.

Every query is answered by the terrain alone, without loading the chunks of a world, and always gives the same answer for the same seed. All methods are thread-safe.

Since:
0.1.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    biomeAt(int x, int y, int z)
    Returns the biome at a block.
    Returns the biome table choosing the biomes from the climate, such as minecraft:overworld.
    double
    density(Key function, int x, int y, int z)
    Evaluates one of the density functions of the world generation data at a block.
    int
    Returns the number of block layers of the terrain, from minY().
    int
    Returns the lowest block height of the terrain.
    int
    Returns the height under which the empty spaces of the ground are flooded.
    long
    Returns the seed every noise of this terrain derives from.
    Returns the noise settings shaping this terrain, such as minecraft:overworld or minecraft:amplified.
    int
    surfaceHeight(int x, int z)
    Gives the height of the ground of a column, once shaped and carved but before anything grows on it: the height just above its highest block that is neither air nor a liquid.
  • Method Details

    • seed

      long seed()
      Returns the seed every noise of this terrain derives from.
      Returns:
      the seed every noise of this terrain derives from
      Since:
      0.1.0
    • settings

      Key settings()
      Returns the noise settings shaping this terrain, such as minecraft:overworld or minecraft:amplified.
      Returns:
      the noise settings shaping this terrain, such as minecraft:overworld or minecraft:amplified
      Since:
      0.1.0
    • biomePreset

      Key biomePreset()
      Returns the biome table choosing the biomes from the climate, such as minecraft:overworld.
      Returns:
      the biome table choosing the biomes from the climate, such as minecraft:overworld
      Since:
      0.1.0
    • minY

      int minY()
      Returns the lowest block height of the terrain.
      Returns:
      the lowest block height of the terrain
      Since:
      0.1.0
    • height

      int height()
      Returns the number of block layers of the terrain, from minY().
      Returns:
      the number of block layers of the terrain, from minY()
      Since:
      0.1.0
    • seaLevel

      int seaLevel()
      Returns the height under which the empty spaces of the ground are flooded.
      Returns:
      the height under which the empty spaces of the ground are flooded
      Since:
      0.1.0
    • biomeAt

      TypedKey<BiomeDefinition> biomeAt(int x, int y, int z)
      Returns the biome at a block.
      Parameters:
      x - the block x
      y - the block y
      z - the block z
      Returns:
      the biome at a block
      Since:
      0.1.0
    • surfaceHeight

      int surfaceHeight(int x, int z)
      Gives the height of the ground of a column, once shaped and carved but before anything grows on it: the height just above its highest block that is neither air nor a liquid.
      Parameters:
      x - the block x
      z - the block z
      Returns:
      the height of the first block above the ground, minY() for a column without ground
      Since:
      0.1.0
    • density

      double density(Key function, int x, int y, int z)
      Evaluates one of the density functions of the world generation data at a block.
      Parameters:
      function - the key of the function, such as minecraft:overworld/continents
      x - the block x
      y - the block y
      z - the block z
      Returns:
      the value of the function
      Throws:
      IllegalArgumentException - if no function has that key
      Since:
      0.1.0