unify structure info.
This commit is contained in:
1 parent
15ac3edc19
commit
ad43784ad6
6 files changed
+83
-45
No files matched your search
@@ -532,13 +532,17 @@ Returns spawn potential at a location (1.16+ only)
|
||||
Checks wordgen eligibility for a structure in a given chunk. If no structure is given, or `null`, then it will check
|
||||
for all structures. If bounding box of the structures is also requested, it will compute size of potential
|
||||
structures. This function, unlike other in the `structure*` category is not using world data nor accesses chunks
|
||||
making it preferred for scoping ungenerated terrain.
|
||||
making it preferred for scoping ungenerated terrain, but it takes some compute money to calculate the structure.
|
||||
|
||||
Unlike `'structure'` this will return a tentative structure location. Random factors in world generation may prevent
|
||||
actual structure from forming.
|
||||
|
||||
If structure is specified, it will return `null` if a chunk is not eligible, `true` if the structure should appear, or
|
||||
a pair of coordinates indicating bounding box of the structure.
|
||||
a map with two values: `'box'` for a pair of coordinates indicating bounding box of the structure, and `'pieces'` for
|
||||
list of elements of the structure (as a tuple), with its name, direction, and box coordinates of the piece.
|
||||
|
||||
If structure is not specified, it will return a set of structure names that are eligible, or a map with structures
|
||||
as keys, and pair of bounding box coordinates as values. An empty set or an empty map would indicate that nothing
|
||||
as keys, and same type of map values as with a single structure call. An empty set or an empty map would indicate that nothing
|
||||
should be generated there.
|
||||
|
||||
|
||||
@@ -548,7 +552,8 @@ Returns structure information for a given block position. Note that structure in
|
||||
blocks from the same chunk. `structures` function can be called with a block, or a block and a structure name. In
|
||||
the first case it returns a map of structures at a given position, keyed by structure name, with values indicating
|
||||
the bounding box of the structure - a pair of two 3-value coords (see examples). When called with an extra structure
|
||||
name, returns list of components for that structure, with their name, direction and two sets of coordinates
|
||||
name, returns a map with two values, `'box'` for bounding box of the structure, and `'pieces'` for a list of
|
||||
components for that structure, with their name, direction and two sets of coordinates
|
||||
indicating the bounding box of the structure piece.
|
||||
|
||||
### `structure_references(pos), structure_references(pos, structure_name)`
|
||||
|
||||
Reference in new issue
Block a user