{{Exclusive|java}} A '''template pool''' is a group of structure pieces of [[jigsaw structure]]s. 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 {{cd|data//worldgen/template_pool}}. == JSON format ==
*{{Nbt|compound}} The root tag. **{{nbt|string|fallback}}: {{json ref|template pool}} — Used as fallback if structures in this pool can't generate. **{{nbt|list|elements}}: A list of elements to randomly select from. ***{{nbt|compound}}: An element. ****{{nbt|int|weight}}: How likely this element is to be chosen when using this pool. Value between 1 and 150 (inclusive). ****{{nbt|compound|element}}: A pool element. *****{{nbt|string|element_type}}: The type of the pool element. See below. *****{{nbt|string|projection}}: Can be {{cd|rigid}} to place a fixed structure (like a house), or {{cd|terrain_matching}} to match the terrain height (like a village road). ***** Additional fields depending on {{nbt|string|element_type}}. See below.
== 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}}: The element **{{nbt|string|element_type}}: {{cd|minecraft:single_pool_element}} **{{nbt|string|projection}}: See above. **{{nbt|string|location}}: {{json ref|structure template|Structure_template}} — The template to place **{{nbt|string}}{{nbt|compound}}{{nbt|list|processors}}: {{json_ref|processor list|Processor_list|inline=1|inline_type={{nbt|compound}}{{nbt|list}}}} — The processors that should modify the template. **{{nbt|string|override_liquid_settings}}: Overrides the {{cd|liquid_settings}} value in structure definition for this particular element. See [[Jigsaw_structure#Data_values]].
=== 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}}: The element **{{nbt|string|element_type}}: {{cd|minecraft:legacy_single_pool_element}} **{{nbt|string|projection}}: See above. **{{nbt|string|location}}: {{json ref|structure template|Structure_template}} — The template to place **{{nbt|string}}{{nbt|compound}}{{nbt|list|processors}}: {{json_ref|processor list|Processor_list|inline=1|inline_type={{nbt|compound}}{{nbt|list}}}} — The processors that should modify the template.
=== 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 downward and has the name {{cd|minecraft:bottom}}.
*{{nbt|compound}}: The element **{{nbt|string|element_type}}: {{cd|minecraft:feature_pool_element}} **{{nbt|string|projection}}: See above. **{{nbt|string|feature}}: {{json ref|placed feature|inline=1}} — The feature to place.
=== 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}}: The element **{{nbt|string|element_type}}: {{cd|minecraft:list_pool_element}} **{{nbt|string|projection}}: See above. **{{nbt|list|elements}}: A list of elements to choose from. ***{{nbt|compound}}: A pool element.
=== Empty pool element === This piece doesn't place anything.
*{{nbt|compound}}: The element **{{nbt|string|element_type}}: {{cd|minecraft:empty_pool_element}} **{{nbt|string|projection}}: See above.
== External links == * [https://misode.github.io/worldgen/template-pool/ Template pool Generator on misode.github.io] == Navigation == {{Navbox Java Edition technical|datapack}} [[fr:Groupe de modèles]] [[pt:Conjunto de modelos]]