Skip to content

World Generator Types

ALongStringOfNumbers edited this page Jun 17, 2021 · 3 revisions

Shape Generator is the method that does the actual generation of a vein shape and defines it's size. General shape generator definition would be:

"generator": {
   "type": "shape generator type here"
   additional per-generator arguments here
}

Available Standard Shape Generators

Ellipsoid Generator (type "ellipsoid")

The most used one, generates ellipsoid veins with configurable radius.

Additional Arguments:

  • radius - if an Integer number, defines absolute radius of generation with +- 30 blocks. If specified as a JSON object, should contain "min" and "max" number fields, which will be used as minimal and maximal radius of ellipsoid.

Sample:

"generator": {
   "type": "ellipsoid"
   "radius": [minRadius, maxRadius]
}

As per the definition of an ellipse, the maximum generation size of the vein will be maxRadius * 2 in the X and Z direction, and maxRadius in the Y direction.

Sphere Generator (type "sphere")

Generates sphere with configurable radius. Additional Arguments:

  • radius - same specification as for ellipsoid's radius. Will attempt to generate a sphere with a random radius between the minimum and maximum values if the minimum and maximum radius values are supplied.

Sample:

"generator": {
   "type": "sphere"
   "radius": [minRadius, maxRadius]
}

As per the definition of a sphere, the maximum generation size of the vein will be maxRadius * 2 in the X, Y, and Z directions.

Plate Generator (type "plate")

Generates plate with configurable sizes. Additional Arguments:

  • length - specifies length of plate by X axis. If Integer number, specifies absolute size. If JSON object, it's "min" and "max" properties specify minimal and maximal size.
  • depth - specifies length of plate by Z axis. If Integer number, specifies absolute size. If JSON object, it's "min" and "max" properties specify minimal and maximal size.
  • height - specifies height of plate. If Integer number, specifies absolute size. If JSON object, it's "min" and "max" properties specify minimal and maximal size.
  • floor_sharpness (optional) - specifies percentage of solid blocks skipped in floor layer generation. Default value is 0.33, meaning that 2/3 of floor of this plate will contain vein blocks.
  • roof_sharpness (optional) - specifies percentage of solid blocks skipped in roof layer generation. Default value is 0.75, meaning that 1/4 of floor of this plate will contain vein blocks. Stone blocks from roof fall down as formations sometimes.

Sample:

"generator": {
  "type": "plate",
  "length": [20, 36],
  "depth": [20, 36],
  "height": [5, 10]
}

Single Block Generator (type: "single")

Generates a small number of a single block type

Additional Arguments:

  • blocks_count - The total number of blocks to be generated in this vein. Can be passed an an Integer value, or as a JSON object consisting of the minimum and maximum values of blocks to generate.

Sample:

"generator": {
   "type": "single"
   "blocks_count": [minValue, maxValue]
}