Files
minecraft-bedrock-json-schemas/worldgen/template_pools/template_pool.json
2024-12-23 19:12:51 +00:00

1 line
3.3 KiB
JSON

{"$schema":"http://json-schema.org/draft-07/schema","$id":"blockception.minecraft.behavior.worldgen.template_pools.template_pool","type":"object","title":"Template Pool","description":"Used to pair block rules with Structure Templates and to randomly place Structure Templates using a weighted list.","required":["format_version","minecraft:template_pool"],"additionalProperties":false,"properties":{"format_version":{"$ref":"#/definitions/A"},"minecraft:template_pool":{"$ref":"#/definitions/B"}},"definitions":{"A":{"title":"Format Version","description":"A version that tells minecraft what type of data format can be expected when reading this file.","pattern":"^([1-9]+)\\.([0-9]+)\\.([0-9]+)$","type":"string","default":"1.21.50","examples":["1.21.50","1.20.81","1.20.40","1.19.0","1.12.0","1.10.0","1.8.0"],"defaultSnippets":[{"label":"New Format version","body":"1.${1|8,10,12,17,18,19,20|}.${3|2|0|}"}]},"B_template_pool_element":{"title":"Template Pool Element","description":"A template pool item used to define the element and its weight.","type":"object","additionalProperties":false,"required":["element"],"properties":{"element":{"title":"Element","description":"A grouping of a Structure Template, the Processor List to use when placing the structure, and its weight that determines the likelihood of the element being chosen.","type":"object","properties":{"element_type":{"title":"Element Type","description":" The type of element.","type":"string","const":"minecraft:single_pool_element"},"location":{"title":"Location","description":"The path of the structure file. This path is relative to the behavior pack's \"structures\" folder.","type":"string"},"processors":{"title":"Processors","description":"The identifier of the processor list to use when placing the structure.","type":"string"}},"required":["element_type","location","processors"]},"projection":{"title":"Projection","description":"Specifies how structures should be placed relative to the terrain.","type":"string","default":"rigid","anyOf":[{"const":"rigid","description":"Structures are placed without any height adjustment."},{"const":"terrain_matching","description":"Structures are placed relative to the terrain height. Structure blocks will adjust along the Y axis to match the ground."}]},"weight":{"title":"Weight","description":"The weighted probability of choosing the element from the pool. For example, a template pool containing 2 structures with weights of 1 and 3 will have a 25% and 75% chance of being chosen respectively.","type":"integer","minimum":1.0,"maximum":200.0}}},"B":{"type":"object","title":"Template Pool","additionalProperties":false,"required":["description","elements"],"properties":{"description":{"title":"Description","description":"The description of this template pool.","type":"object","additionalProperties":false,"required":["identifier"],"properties":{"identifier":{"title":"Identifier","description":"Identifier of the template pool. This is used by both the start_pool property of the Jigsaw Structure JSON and the Jigsaw Block's Target Pool field.","type":"string"}}},"elements":{"title":"Elements","description":"An array of pool elements.","type":"array","minItems":1,"items":{}},"fallback":{"title":"Fallback","description":"Fallback template pool to use if no element in the pool can be placed successfully.","type":"string"}}}}}