Template pool
This content already exists as not experimental in Java Edition .
A template pool is a group of structure pieces of jigsaw structures. A structure piece is a structure template, a placed feature, or a combination of multiple other pieces. During generation, pieces are randomly selected from the pool. Template pools are configured using JSON files stored within a data pack in the folder data/<namespace>/worldgen/template_pool.
JSON format
- [NBT Compound / JSON Object] The root tag.
- [String] fallback: One (an [String] ID) — Used for terminating pieces (such as the end of a village road) or as fallback if structures in this pool can't generate.
- [NBT List / JSON Array] elements: A list of elements to randomly select from.
- [NBT Compound / JSON Object]: An element.
- [Int] weight: How likely this element is to be chosen when using this pool. Value between 1 and 150 (inclusive).
- [NBT Compound / JSON Object] element: A pool element.
- [String] element_type: The type of the pool element. See Template pool § Pool elements.
- [String] projection: Can be
rigidto place a fixed structure (like a house), orterrain_matchingto match the terrain height (like a village road). - Additional fields depending on [String] element_type. See Template pool § Pool elements.
- [NBT Compound / JSON Object]: An element.
Pool elements
A pool element represents a single piece of a jigsaw structure.
Single pool element
This piece places a single structure template. The jigsaw blocks in the template are used for connections and the size of the template determines the bounding box of the piece. The template gets processed using a processor list.
- [NBT Compound / JSON Object]: The element
- [String] element_type:
minecraft:single_pool_element - [String] projection: See above.
- [String] location: One structure template (an [String] ID) — The template to place
- [String][NBT Compound / JSON Object][NBT List / JSON Array] processors: One processor list (an [String] ID, or a new [NBT Compound / JSON Object][NBT List / JSON Array] processor list definition) — The processors that should modify the template.
- [String] override_liquid_settings: Overrides the
liquid_settingsvalue in structure definition for this particular element. See Jigsaw_structure#Data_values.
- [String] element_type:
Legacy single pool element
This is a legacy version of the single pool element that doesn't place any air blocks in the template, instead keeping the original block of the world.
- [NBT Compound / JSON Object]: The element
- [String] element_type:
minecraft:legacy_single_pool_element - [String] projection: See above.
- [String] location: One structure template (an [String] ID) — The template to place
- [String][NBT Compound / JSON Object][NBT List / JSON Array] processors: One processor list (an [String] ID, or a new [NBT Compound / JSON Object][NBT List / JSON Array] processor list definition) — The processors that should modify the template.
- [String] element_type:
Feature pool element
This piece places a placed feature. The bounding box of the piece is 1×1×1 blocks. The piece gets connected to its parent piece as if it had a jigsaw block that faces downwards with the name minecraft:bottom.
- [NBT Compound / JSON Object]: The element
- [String] element_type:
minecraft:feature_pool_element - [String] projection: See above.
- [String] feature: One placed feature (an [String] ID, or a new [NBT Compound / JSON Object] placed feature definition) — The feature to place.
- [String] element_type:
List pool element
This piece places multiple pool elements at once in the same place. Pieces lower in the list replace blocks of pieces higher in the list. The bounding box of the piece is the smallest box that contains all elements bounding boxes. Only the jigsaw blocks of the first element are used for connections.
- [NBT Compound / JSON Object]: The element
- [String] element_type:
minecraft:list_pool_element - [String] projection: See above.
- [NBT List / JSON Array] elements: A list of elements to choose from.
- [NBT Compound / JSON Object]: A pool element.
- [String] element_type:
Empty pool element
This piece doesn't place anything.
- [NBT Compound / JSON Object]: The element
- [String] element_type:
minecraft:empty_pool_element - [String] projection: See above.
- [String] element_type:
External links
| |||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||