Namespace GenerationUtils

Module used to simplify generation tasks in mods logic.

Functions

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns boolean

    true, if one can see sky from the specified position, false otherwise.

  • Finds limited to y=128 coordinate empty space on the specified x and z coordinates.

    Parameters

    • x: number
    • z: number

    Returns Vector

  • Finds limited to y=64 coordinate empty space on the specified x and z coordinates.

    Parameters

    • x: number
    • z: number

    Returns Vector

  • Finds limited to the specified y coordinate empty space on the specified x and z coordinates.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Vector

  • Generates ore vein on the specified coordinates.

    Parameters

    • x: number
    • y: number
    • z: number
    • id: number

      ore block ID

    • data: number

      ore block data

    • amount: number

      ore amount, use at least 6 to be able to find generated ore vein; note that amount doesn't mean blocks count, it is just an input value for generation algorithm

    • noStoneCheck: boolean

      if true, no check for stone is performed so the ore may be generated in the air; use this to debug ore generation in the superflat worlds

    Returns void

  • Generates ore vein on the specified coordinates with custom whitelist/blacklist.

    Parameters

    • x: number
    • y: number
    • z: number
    • id: number

      ore block ID

    • data: number

      ore block data

    • amount: number

      ore amount, use at least 6 to be able to find generated ore vein; note that amount doesn't mean blocks count, it is just an input value for generation algorithm

    • whitelist: boolean

      if true, specified block IDs are used as whitelist for generation (only the IDs from the list can be replaced with ores); if false, specified block IDs are used as a blacklist (only the IDs from the list canNOT be replaced with ores)

    • listOfIds: number[]

      array of block IDs to be used as whitelist or blacklist

    Returns void

    2.0.1b17

  • Generates ore vein on the specified coordinates using specified params.

    Parameters

    • x: number
    • y: number
    • z: number
    • params: MinableParams

      vein generation params

    Returns void

  • Retrieves perlin noise value at the specified coordinates.

    Parameters

    • x: number
    • y: number
    • z: number
    • Optionalseed: number

      integer random generator seed. If not specified or set to 0, the default constant value is used

    • Optionalscale: number

      noise size, to set the main octave size, use 1 / octave size

    • OptionalnumOctaves: number

      number of octaves, the more octaves you use, the more detailed is the generated noise. The next octave is two times smaller then the previous one

    Returns number

    2.0.1b11

  • Parameters

    • id: number

      numeric tile ID

    Returns boolean

    true if block is solid and light blocking block, false otherwise.

  • Parameters

    • id: number

      numeric tile ID

    Returns boolean

    true if block is transparent, false otherwise.

  • Generates random coordinates inside specified chunk.

    Parameters

    • cx: number

      chunk x coordinate

    • cz: number

      chunk z coordinate

    • Optionallowest: number

      lowest possible y coordinate; default is 0

    • Optionalhighest: number

      highest possible y coordinate; default is 128

    Returns Vector

  • Generates random x and z coordinates inside specified chunk.

    Parameters

    • cx: number

      chunk x coordinate

    • cz: number

      chunk z coordinate

    Returns {
        x: number;
        z: number;
    }

    • x: number
    • z: number

Type Aliases

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.