biome.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ---@meta
  2. -- Used by `minetest.register_biome`.
  3. --
  4. -- The maximum number of biomes that can be used is 65535. However, using an
  5. -- excessive number of biomes will slow down map generation. Depending on
  6. -- desired performance and computing power the practical limit is much lower.
  7. ---@class mt.BiomeDef
  8. ---@field name string
  9. -- Node dropped onto upper surface after all else is generated.
  10. ---@field node_dust string
  11. ---@field node_top string
  12. -- Node forming surface layer of biome and thickness of this layer.
  13. ---@field depth_top number
  14. ---@field node_filler string
  15. -- Node forming lower layer of biome and thickness of this layer.
  16. ---@field depth_filler number
  17. -- Node that replaces all stone nodes between roughly y_min and y_max.
  18. ---@field node_stone string
  19. ---@field node_water_top string
  20. -- Node forming a surface layer in seawater with the defined thickness.
  21. ---@field depth_water_top number
  22. -- Node that replaces all seawater nodes not in the surface layer.
  23. ---@field node_water string
  24. -- Node that replaces river water in mapgens that use `default:river_water`.
  25. ---@field node_river_water string
  26. ---@field node_riverbed string
  27. -- Node placed under river water and thickness of this layer.
  28. ---@field depth_riverbed number
  29. -- * Nodes placed inside 50% of the medium size caves.
  30. -- * Multiple nodes can be specified, each cave will use a randomly
  31. -- chosen node from the list.
  32. -- * If this field is left out or `nil`, cave liquids fall back to
  33. -- classic behaviour of lava and water distributed using 3D noise.
  34. -- * For no cave liquid, specify "air".
  35. ---@field node_cave_liquid string|string[]
  36. -- * Node used for primary dungeon structure.
  37. -- * If absent, dungeon nodes fall back to the `mapgen_cobble` mapgen
  38. -- alias, if that is also absent, dungeon nodes fall back to the biome
  39. -- `node_stone`.
  40. -- * If present, the following two nodes are also used.
  41. ---@field node_dungeon string
  42. -- * Node used for randomly-distributed alternative structure nodes.
  43. -- * If alternative structure nodes are not wanted leave this absent for
  44. -- performance reasons.
  45. ---@field node_dungeon_alt string
  46. -- * Node used for dungeon stairs.
  47. -- * If absent, stairs fall back to `node_dungeon`.
  48. ---@field node_dungeon_stair string
  49. ---@field y_max number Upper limits for biome.
  50. ---@field y_min number Lower limits for biome.
  51. -- * XYZ limits for biome, an alternative to using `y_max`.
  52. -- * Biome is limited to a cuboid defined by these positions.
  53. -- * Any x, y or z field left undefined defaults to `-31000`.
  54. ---@field max_pos mt.Vector
  55. -- * XYZ limits for biome, an alternative to using `y_min`.
  56. -- * Biome is limited to a cuboid defined by these positions.
  57. -- * Any x, y or z field left undefined defaults to `31000`.
  58. ---@field min_pos mt.Vector
  59. -- * Vertical distance in nodes above `y_max` over which the biome will
  60. -- blend with the biome above.
  61. -- * Set to `0` for no vertical blend.
  62. -- * Defaults to `0`.
  63. ---@field vertical_blend number
  64. ---@field heat_point number
  65. -- * Characteristic temperature and humidity for the biome.
  66. -- * These values create `biome points` on a voronoi diagram with heat and
  67. -- humidity as axes. The resulting voronoi cells determine the
  68. -- distribution of the biomes.
  69. -- * Heat and humidity have average values of `50`, vary mostly between
  70. -- `0` and `100` but can exceed these values.
  71. ---@field humidity_point number
  72. local biome