Join GitHub today
Biome API: Add decoration flags for underground decorations #6519
Biome API: Add decoration flags for underground decorations
Add "all_floors" and "all_ceilings" flags for simple and schematic
Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y
Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete
Works for simple and schematic decorations, all existing functionality is preserved, but ceiling decorations necessarily have an inverted 'place offset y' parameter, so that '-1' always results in decorations being buried into their surface by 1 node.
2 new decoration flags are added, a decoration can have either or both. If it has both the decoration will be generated on floors and ceilings within a single node column, the useful result is that this can then be used for realistically-vertically-aligned stalactites and stalagmites that sometimes meet in the middle to form columns.
Decoration code in current master randomly chooses a node column, finds the highest surface from the 'heightmap' array and places the decoration.
Now in this PR, for each node column chosen:
changed the title from
Biome API: Underground decorations
Biome API: Add underground decorations
Oct 15, 2017
Approved by SmallJoker (Krock) http://irc.minetest.net/minetest-dev/2017-10-28#i_5122201