User:Aeldrion/Projects/Aetlas

Aetlas is a utility data pack developed by Aeldrion for Minecraft 1.15 that helps other data packs generate structures in a world without conflict. Its development started in November 2019 and has not been released yet. It will be available both as a standalone bundlable data pack and as an AESTD module.

Structure table
Structure tables are storage NBT tags that represent what structures should be loaded in a specific chunk. The structure table format imitates loot tables. Although structure tables do not use JSON, NBT keys use quotation marks for JSON compatibility. The structure table format is as follows:


 * : A list of all pools for this table. Each pool used generates structures from its list of structures based on the number of rolls. Pools are applied in order.
 * A pool.
 * Determines conditions for this pool to be used. If multiple conditions are specified, all must pass.
 * A condition.
 * Namespaced ID of condition. Valid conditions are described below.
 * : Specifies the exact number of rolls on the pool.
 * : Specifies a random number of rolls within a range.
 * : Minimum number of rolls. Inclusive.
 * : Maximum number of rolls. Inclusive.
 * : A list of all things that can be produced by this pool. One entry is chosen per roll as a weighted random selection from all entries without failing conditions.
 * An entry.
 * : Determines conditions for this entry to be used. If multiple conditions are specified, all must pass.
 * A condition.
 * : ID of condition. Valid conditions are described below.
 * : ID type of entry. Can be  for structure entries,   to produce structures from another structure table,   for child entries,   to select one sub-entry from a list,   to select sub-entries until one entry cannot be granted, or   for an entry that generates nothing.
 * For type, ID name of the structure to be produced.
 * For type, structure table to be used. Aetlas does not handle cyclic references. If a cyclic reference is used, the command limit will be reached and no structure will be loaded.
 * For type  a list of entries that are used to generate structures. Can be used for convenience, e.g. if one condition applies for multiple entries.
 * For type  a list of entries of which the first, and only the first, successful entry gets generated.
 * For type  a list of entries that are used until the first entry fails. After an entry fails, no more entries of this list are generated.
 * : For type, applies functions to the structure being generated. Functions are applied in order.
 * A function.
 * : ID of the function to apply. Valid functions are described below.
 * : Determines conditions for this function to be applied. If multiple conditions are specified, all must pass.
 * A condition.
 * : ID of condition. Valid conditions are described below.
 * : Determines how often this entry is chosen out of all the entries in the pool. Entries with higher weights are used more often (chance is $this entry's weight/total of all considered entries' weights$).
 * A condition.
 * : ID of condition. Valid conditions are described below.
 * : Determines how often this entry is chosen out of all the entries in the pool. Entries with higher weights are used more often (chance is ⇭⇭⇭).

Functions

 * announce_in_chat - Announces that this structure has been generated in every player's chat.
 * : Optional. Defines a string to display between brackets at the beginning of the message. This is useful to identify which data pack generated a specific structure, or for debugging. Defaults to.
 * : Optional. Whether or not the message should contain the coordinates of the new structure.


 * disable_entities - Prevents the structure from loading entities.


 * offset_position - Offsets the position of the loaded structure.
 * : Specifies the exact offset following the x axis.
 * : Specifies a random offset within a range.
 * : Minimum value.
 * : Maximum value.
 * : Specifies the exact offset following the y axis.
 * : Specifies a random offset within a range.
 * : Minimum value.
 * : Maximum value.
 * : Specifies the exact offset following the z axis.
 * : Specifies a random offset within a range.
 * : Minimum value.
 * : Maximum value.


 * random_mirror - Applies a random mirror.


 * random_rotation - Applies a random rotation.


 * set_height - Sets the height at which the floor of the structure is generated.
 * : Specifies the exact height at which the structure is generated.
 * : Specifies a random height within a range.
 * : Minimum value.
 * : Maximum value.
 * : Optional. Whether height should be absolute or relative to the height of the surface.
 * : Optional. Only interpreted when  is true. Counts water and lava as air, meaning that the structure can be generated relatively to the bottom of an ocean instead of its surface.


 * set_integrity - Sets the integrity of the structure.
 * : How complete the structure that gets placed is. 1.0 is intact.
 * : Optional. The seed to use for the structure integrity, 0 means random.


 * set_mirror - Sets the mirror of the structure.
 * : Must be "NONE", "LEFT_RIGHT", or "FRONT_BACK".


 * set_rotation - Sets the rotation of the structure.
 * : Must be "NONE", "CLOCKWISE_90", "CLOCKWISE_180", or "COUNTERCLOCKWISE_90".

Conditions
Structure tables use various conditions that add requirements to a structure, pool, or function. Below are a list of valid conditions, and the tags used by them. The tags are placed in the same condition object as.


 * alternative - Joins conditions from parameter terms with "or".
 * : A list of conditions to join using 'or'.


 * inverted - Inverts condition from parameter term.
 * : The condition to be negated.


 * location_check - Checks if the current location matches.
 * - optional offsets to location
 * - optional offsets to location
 * - optional offsets to location
 * Predicate applied to location, uses same structure as advancements. block and fluid are not supported.
 * : Sets the location check position to the surface of the current position.
 * : Only interpreted when  is true. Counts water and lava as air, meaning that the location check can be executed at the bottom of a body of water or lava instead of its surface.
 * : Only interpreted when  is true. Counts water and lava as air, meaning that the location check can be executed at the bottom of a body of water or lava instead of its surface.


 * random_chance - Test if a random number 0.0–1.0 is less than a specified value. Calculation is deterministic, based on current coordinates and world seed.
 * : Success rate as a number 0.0–1.0.


 * reference - Test if another referred condition passes. Unlike predicate references, this points to a condition in the  storage tag.
 * : The name of the condition referred to. Aetlas does not handle cyclic references. If a condition ultimately refers to itself, the command limit will be reached and no structure will load.


 * surface_properties - Test properties of the surface of the current position.
 * : If true, the condition evaluates to true only if the heights of the corners of the 15x15 terrain square centered on the current position are within a range of 3 blocks.
 * : If true, the condition evaluates to true only if a lake is detected in a 9x9 area.
 * : If true, the condition evaluates to true only if there is a tree detected in a 9x9 area.
 * : If true, the condition evaluates to true only if there is a village detected in a 25x25 area.


 * weather_check  - Checks for a current weather state
 * : If true, the condition evaluates to true only if it's raining.
 * : If true, the condition evaluates to false only if it's thundering.