Package: mcblueprints
BlueprintsText-based structures for Minecraft.Blueprints are a text-based structure format for Minecraft optimized for human-readability. A blueprint compiles-down to a single NBT structure file that can be loaded with a structure block.Here are some reasons you may want to use blueprints:They can be diff'd andproperlyincluded in version control, unlike their NBT equivalent.They are far smaller and less repetitive than their SNBT equivalent, which is often used for version control.They can be expressed purely through text, without having to think about the underlying structure format (and without having to open the game).They can be updated to (and optimized for) a newer version of the game, just by re-running the CLI with the--data_versionargument.They have the potential to take up significantly less space than their NBT equivalent, for codebases that take advantage of composition.Keep in mind that - although they are optimized for human-readbility - blueprints aren't nearly as "hands-on" as editing structures in-game. There are pros and cons to either approach, and the case for blueprints should be weighed carefully based on project size and complexity.UsageBlueprints are created and maintained in the same way as vanilla resources, but under a made-upblueprintsfolder.See theexamplesand thedemo packfor reference.The most basic invocation of the CLI looks like this:python-mblueprintsbuild--inputpath/to/input/pack--outputpath/to/output/pack--data_version2715--inputis the path to the input pack. This is where your blueprints reside.--outputis the path to the output pack. This is where the generated structures files will be placed. This can be the same as the input pack, but beware of overwriting existing files.--data_versionis required and2715should be replaced with theversion of the gameyou are targeting.Runpython -m mcblueprints build --helpfor a complete list of options.ExamplesAll examples use YAML instead of JSON, but the YAML used is 1:1 convertible to/from JSON.See the fulldemo packfor a complete set of examples.This first example uses basic blocks to create a simple structure.fleecy_box:basedata/fleecy_box/blueprints/base.yaml# Restrict the size of the structure. An error will be raised if anything extends# outside of these bounds. This goes by (x, y, z) or (length x height x width).size:[5,5,5]# The palette maps characters to different types of palette entries that describe how to# populate the structure. These can be blocks as well as other blueprints.palette:# Strings are assumed to be basic blocks._:minecraft:airg:minecraft:glassc:minecraft:glowstoneb:minecraft:bricks# To define block states, use the block type entry.P:type:blockname:minecraft:quartz_pillarstate:axis:yX:type:blockname:minecraft:tntstate:unstable:true# To define NBT data, use the block type entry.T:type:blockname:minecraft:trapped_chestdata:Items:-id:minecraft:diamondCount:1bSlot:13b# The layout is a 2-D list of strings (a 3-D list of characters) that says how to build# the structure, piece by piece, using the palette. Note that the first section of the# layout corresponds to the top-most layer of blocks in the structure.layout:--ggggg-ggggg-ggggg-ggggg-ggggg--ggggg-g___g-g___g-g___g-ggggg--ggggg-g___g-g_T_g-g___g-ggggg--cgggc-g___g-g_P_g-g___g-cgggc--bbbbb-bbbbb-bbXbb-bbbbb-bbbbbThis next example uses composition and a filter to include a modified version of another blueprint.fleecy_box:copperdata/fleecy_box/blueprints/copper.yaml# Make sure to account for any included structures in the final structure.size:[5,5,5]palette:# Blueprints are composable. They can be included within one another, and the final# structure will be a flattened version with a minimal palette.B:type:blueprintblueprint:fleecy_box:base# A filter changes the way blocks are included from other blueprints.filter:fleecy_box:copperizelayout:--BNote the use of a filter: these can be used to change the way blocks are included from other blueprints.fleecy_box:copperizedata/fleecy_box/filters/copperize.yaml# Replace one block with another block.-type:replace_blocksblocks:-minecraft:bricksreplacement:minecraft:cut_copper-type:replace_blocksblocks:-minecraft:glowstone-minecraft:quartz_pillarreplacement:minecraft:copper_block# Keep only the listed blocks, discarding the rest.-type:keep_blocksblocks:-minecraft:copper_block-minecraft:cut_copper