Minecraft:Template pool: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{missing info|the structure pool element; no information about it is listed here.}} | |||
A '''template pool''' is a group of structure pieces of [[Minecraft:jigsaw structure]]s. A structure piece is a [[Minecraft:structure template]], a [[Minecraft:placed feature]], or a combination of multiple other pieces. During generation, pieces are randomly selected from the pool. Template pools are configured using [[Minecraft:JSON]] files stored within a data pack in the folder {{cd|data/<namespace>/worldgen/template_pool}} or a addon at {{cd|<root BP>/worldgen/template_pools}}. | A '''template pool''' is a group of structure pieces of [[Minecraft:jigsaw structure]]s. A structure piece is a [[Minecraft:structure template]], a [[Minecraft:placed feature]], or a combination of multiple other pieces. During generation, pieces are randomly selected from the pool. Template pools are configured using [[Minecraft:JSON]] files stored within a data pack in the folder {{cd|data/<namespace>/worldgen/template_pool}} or a addon at {{cd|<root BP>/worldgen/template_pools}}. | ||
| Line 64: | Line 66: | ||
This piece places a [[Minecraft:placed feature]]. The bounding box of the piece is 1×1×1 blocks. The piece can have any name and no target name is required for the parent jigsaw block. | This piece places a [[Minecraft:placed feature]]. The bounding box of the piece is 1×1×1 blocks. The piece can have any name and no target name is required for the parent jigsaw block. | ||
Feature will always attempt to spawn if jigsaw {{cd|joint}} is set to {{cd|rollable}}. If {{cd|joint}} is set to {{cd|aligned}}, then a feature will | Feature will always attempt to spawn if jigsaw {{cd|joint}} is set to {{cd|rollable}}. If {{cd|joint}} is set to {{cd|aligned}}, then a feature will attempt to spawn only when structure rotation upon generation is corresponding to jigsaw {{cd|orientation}} in next cases: 0°={{cd|up_south}}, 90°={{cd|up_east}}, 180°={{cd|up_north}}, 270°={{cd|up_west}}. | ||
<div class="treeview"> | <div class="treeview"> | ||
*{{nbt|compound}}: The element | *{{nbt|compound}}: The element | ||
**{{nbt|string|element_type}}: {{cd|minecraft:feature_pool_element}} | **{{nbt|string|element_type}}: {{cd|minecraft:feature_pool_element}} | ||
**{{nbt|string|projection}}: See above. | **{{nbt|string|projection}}: See above. {{only|je|short=1}} | ||
**{{nbt|string|feature}}: {{json ref|placed feature|inline=1}} — The feature to place. | **{{nbt|string|feature}}: {{json ref|placed feature|inline=1}} — The feature to place. | ||
</div> | </div> | ||
| Line 100: | Line 102: | ||
|{{HistoryLine|java}} | |{{HistoryLine|java}} | ||
|{{HistoryLine||26.3|dev=snap6|The feature pool element can now connect to jigsaw blocks with any target name, instead of just {{cd|minecraft:bottom}}.}} | |{{HistoryLine||26.3|dev=snap6|The feature pool element can now connect to jigsaw blocks with any target name, instead of just {{cd|minecraft:bottom}}.}} | ||
}} | |||
=== ''Bedrock Edition'' === | |||
{{HistoryTable | |||
|{{HistoryLine|bedrock}} | |||
|{{HistoryLine||1.21.50|exp=Data-Driven Jigsaw Structures|dev=Preview 1.21.50.26|Template pools have been added and can be customized in [[Minecraft:add-on]]s, using files json.}} | |||
|{{HistoryLine||1.21.100|exp=Data-Driven Jigsaw Structures|dev=Preview 1.21.100.20|Added {{cd|minecraft:empty_pool_element}}.}} | |||
|{{HistoryLine||1.21.120|dev=Preview 1.21.120.23|Template pools can now be customized without using any experiments.}} | |||
|{{HistoryLine||26.20|dev=Preview 26.20.20|Added {{cd|minecraft:feature_pool_element}}. Only connects to vanilla features.}} | |||
|{{HistoryLine||26.20|dev=Preview 26.20.21|{{cd|minecraft:feature_pool_element}} can now connect to data driven features.}} | |||
}} | }} | ||
Latest revision as of 11:17, 28 October 2026
A template pool is a group of structure pieces of Minecraft:jigsaw structures. A structure piece is a Minecraft:structure template, a Minecraft:placed feature, or a combination of multiple other pieces. During generation, pieces are randomly selected from the pool. Template pools are configured using Minecraft:JSON files stored within a data pack in the folder Template:Cd or a addon at Template:Cd.
JSON format
- Template:Nbt The root tag.
- Template:Nbt: Template:Json ref — Used for terminating pieces (such as the end of a village road) or as fallback if structures in this pool can't generate. (Note that empty pool elements don't trigger this, they just generate nothing.)
- Template:Nbt: A list of elements to randomly select from.
- Template:Nbt: An element.
- Template:Nbt: How likely this element is to be chosen when using this pool. Value between 1 and 150 (inclusive).
- Template:Nbt: A pool element.
- Template:Nbt: The type of the pool element. See Template:Slink.
- Template:Nbt: Can be Template:Cd to place a fixed structure (like a house), or Template:Cd to match the terrain height (like a village road).
- Additional fields depending on Template:Nbt. See Template:Slink.<section end="json format" />
- Template:Nbt: An element.
- Template:Nbt The root tag.
- Template:Nbt: Template:More info
- Template:Nbt
- Template:Nbt
- Template:Nbt: The identifier used for this template pool.
- Template:Nbt: Template:Json ref — Used for terminating pieces (such as the end of a village road) or as fallback if structures in this pool can't generate. (Note that empty pool elements don't trigger this, they just generate nothing.)
- Template:Nbt: A list of elements to randomly select from.
- Template:Nbt: An element.
- Template:Nbt: How likely this element is to be chosen when using this pool. Value between 1 and 150 (inclusive).
- Template:Nbt: A pool element.
- Template:Nbt: The type of the pool element. See Template:Slink.
- Template:Nbt: Can be Template:Cd to place a fixed structure (like a house), or Template:Cd to match the terrain height (like a village road).
- Additional fields depending on Template:Nbt. See Template:Slink.
- Template:Nbt: An element.
- Template:Nbt
<section end="json format" />
Pool elements
A pool element represents a single piece of a Minecraft:jigsaw structure.
Single pool element
This piece places a single Minecraft: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 Minecraft:processor list.
- Template:Nbt: The element
- Template:Nbt: Template:Cd
- Template:Nbt: See above.
- Template:Nbt: Template:Json ref — The template to place
- Template:NbtTemplate:NbtTemplate:Nbt: Template:Json ref — The processors that should modify the template.
- Template:NbtTemplate:Only: Overrides the Template:Cd value in structure definition for this particular element. See Minecraft:Jigsaw_structure#Data_values.
Legacy single pool element
Template:Exclusive 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.
- Template:Nbt: The element
- Template:Nbt: Template:Cd
- Template:Nbt: See above.
- Template:Nbt: Template:Json ref — The template to place
- Template:NbtTemplate:NbtTemplate:Nbt: Template:Json ref — The processors that should modify the template.
Feature pool element
This piece places a Minecraft:placed feature. The bounding box of the piece is 1×1×1 blocks. The piece can have any name and no target name is required for the parent jigsaw block.
Feature will always attempt to spawn if jigsaw Template:Cd is set to Template:Cd. If Template:Cd is set to Template:Cd, then a feature will attempt to spawn only when structure rotation upon generation is corresponding to jigsaw Template:Cd in next cases: 0°=Template:Cd, 90°=Template:Cd, 180°=Template:Cd, 270°=Template:Cd.
- Template:Nbt: The element
- Template:Nbt: Template:Cd
- Template:Nbt: See above. Template:Only
- Template:Nbt: Template:Json ref — The feature to place.
List pool element
Template:Exclusive This piece places multiple pool elements in sequence. The first element is connected using a jigsaw block, further elements are placed with their starting point at (0,0,0) of the bounding box of the first element using the same rotation. If an element fails to generate, then it and all further elements are discarded. The bounding box of the piece is the smallest box that contains all element bounding boxes. This piece cannot generate any further child pieces.
- Template:Nbt: The element
- Template:Nbt: Template:Cd
- Template:Nbt: See above.
- Template:Nbt: A list of elements to choose from.
- Template:Nbt: A pool element.
Empty pool element
This piece doesn't place anything.
- Template:Nbt: The element
- Template:Nbt: Template:Cd
- Template:Nbt: See above. Template:Only
History
Java Edition
Bedrock Edition
External links
Template:Navbox Java Edition technical
Minecraft:de:Vorlagenpool Minecraft:fr:Groupe de modèles Minecraft:pt:Conjunto de modelos Minecraft:zh:模板池