Making a theme
A theme is made in the game: Freehold sets out one of its buildings in front of you, you rebuild it with ordinary blocks, and one command reads it back into a datapack. Nothing has to be installed and no file has to be written by hand. This page walks through it a building at a time.
Before you start
- A world of your own, in creative mode, with cheats on — every command here needs operator rights. A superflat world gives the most room.
- A name for the theme: lower-case letters, digits and
_ - ., but notfreehold, notminecraftand not dots alone. It is the namespace of the datapack, and it is what the founding screen shows unless a resource pack gives it a nicer name. - Which buildings there are:
/freehold blueprint listlists them, with keys likefreehold:house_t1—_t2is the second level — and their versions, likedefaultorporch.
1. Set out the template
Stand on open ground and type
/freehold theme template <theme> <building> [version], for example
/freehold theme template nordic freehold:house_t1. Without a version it is
default.
- The building appears around where you stand, its anchor block one block under your feet, and always unturned: north is the front of the drawing.
- A frame shows the box the building may fill, with labelled marks.
- The chat holds the export command for this template, ready to click. It carries the corner of the box, so keep it, or come back to it later.
- If your theme already has this version, the template is your own drawing, so you can go on where you left off; otherwise it is Freehold's.
2. Rebuild it
Inside the frame everything is yours, and so is its height: walls, wall height, roof form and pitch, windows, façade, furnishing, material. A building may rise above the frame or stay lower than it — see A taller or lower building. Four things are fixed, and the export refuses if one of them is off — so a rebuilt building stands on the ground wherever Freehold's own one does:
- The footprint of the box. Nothing beside the frame is taken, and nothing above the height the export reads.
- The anchor block (
freehold:building_anchor) stays where it is. - The marker blocks stay where they are, and none may be added or taken away. They are the
coloured blocks
freehold:dev_marker_work,…_home,…_entrance,…_road_linkand…_storage_access, and they show where residents work, sleep and come in, where the road meets the building and where the store is reached. Keep the cells in front of and above them free: a resident has to stand there and get there from the entrance. A marker that is shut in gives a yellow warning at the export. - The depth of the foundation. The game builds the foundation under the box itself; it is not part of the template.
Invisible blocks
Where Freehold's building leaves the ground as it is, the template sets structure void
(minecraft:structure_void), an invisible vanilla block. What you do with it decides that cell:
- Leave the structure void, and the ground there stays as it is when the building goes up.
- Put a block in its place, and the block belongs to the building.
- Put air in its place, and the building clears the cell.
- Set structure void yourself to take a cell out of the building.
Material that follows the biome
Use Freehold's own blocks, and your building takes the wood and stone of its biome — spruce in the taiga, sandstone in the desert, as Freehold's buildings do. The export writes these blocks back as their material:
| Block | Becomes |
|---|---|
| Oak planks, stairs, slab, log, stripped log, stripped log slab, trapdoor, door, fence | light wood |
| Spruce planks, stairs, slab, log, stripped log, stripped log slab, trapdoor, door, fence; mangrove trapdoor (the window) | dark wood |
| Cobblestone, cobblestone stairs, slab and wall | stone |
| Stone bricks, stone brick stairs and slab; polished andesite | masonry |
| Coarse dirt | ground |
The exact list is the default line of each file under data/freehold/material_class/
— see material_class/. If your theme has class files of its own, their
default blocks count instead. Every other block stays the same in every biome —
glass, lanterns, birch planks — which is what you want where a building should look alike everywhere. To keep
every block as it is, add blocks to the end of the export command.
3. Export it
Click the command in the chat and send it:
/freehold theme export <theme> <building> <version> <x> <y> <z> [height] [blocks].
- Without a height the export reads the box as high as your theme already draws the building in another version, and otherwise as high as the template. For a different height, see A taller or lower building.
- A red line is an error, with the coordinates of the problem, and nothing is written.
- A yellow line is a warning; the building is written anyway.
- “Not one of the … marker blocks stands where the drawing has it” means the corner in the command is wrong — use the command the template gave you.
- On success the theme lies in
<world>/datapacks/<theme>/; the folder is created along with itspack.mcmeta.
4. Load it and look at it
Run /reload. Then /freehold blueprint preview <theme>:<building>
sets the result out where you stand, and a settlement builds it once it is in that theme: choose it at the
founding, or set it with /freehold theme set <freehold> <theme> — see
Themes.
A taller or lower building
A theme may draw a building taller or lower than Freehold's. Build on above the template, or
leave its top layers empty, and give the export the height you want as the number of layers it reads back, counted
up from the corner in the command — at least 2:
/freehold theme export nordic freehold:house_t1 default <x> <y> <z> 12.
- Above the template every block counts as part of the building. A marker block there is an error: markers cannot move.
- A lower box must not cut off a marker. If one of the template's markers lies above the height you give, the export refuses and names the marker.
- Every version of a building in one theme has the same height. If your theme already draws another version of it, a different height is refused — “The theme draws the other variants of … layers high; every variant of a key in a theme shares its box”. A version that wants to be lower than its siblings leaves its top layers empty.
- A box that would reach above the build limit is refused.
In the game a building is as tall as its theme draws it. The outline when placing it, the levelling of its site, its protection and its demolition reach up to that height, and a windmill beside it sees that height when it checks its open stand. What happens to standing buildings when a settlement changes to a theme of another height is on Themes.
Versions
Export the version default of a building first — without it, the export refuses
every other. A building placed in a version your theme does not draw is built in your theme's
default. All versions of a building in your theme share one height — see
A taller or lower building.
Handing it on
Zip the folder <world>/datapacks/<theme>/. Next to the game's files it
holds the drawings as text under blueprint_source/, so whoever works on the theme next sets out your
drawing with template and builds on. Freehold's licence allows datapacks of your own.
Common pitfalls
/fill … replacesets a block in its plain state: stairs, doors and trapdoors lose their facing. Set them by hand.- A bed, a door or any block of two parts has to lie wholly inside the frame.
- New material classes of your theme count at the export only after
/reload.
Recolouring only
One material class file recolours every building without a single one rebuilt.
data/<theme>/material_class/wood.json replaces Freehold's wood as a whole — nothing of Freehold's
file is mixed in. The same goes for stone, masonry and ground. Its shape:
{
"schema_version": 1,
"ranks": {
"light": {
"default": {"planks": "minecraft:birch_planks", "stairs": "minecraft:birch_stairs", "...": "..."},
"biomes": {"minecraft:taiga": {"planks": "minecraft:spruce_planks", "...": "..."}}
},
"dark": {"default": {"...": "..."}}
}
}
- Every form Freehold's file has must stand in
default— for wood:planks,stairs,slab,log,stripped_log,trapdoor,door,fence,log_slab,window. - A biome without an entry takes
default. A key underbiomesmay also name a biome tag, as"#minecraft:is_taiga"; a biome without a line of its own takes the first tag line it carries, in the order of the file, beforedefault— see material_class/. - The dark wood must be darker than the light, or the file is dropped at loading, with a line in the log.
- The best start is Freehold's own file,
data/freehold/material_class/wood.jsonin the mod's jar.
For the advanced
The export also writes the drawing as text, to
data/<theme>/blueprint_source/<building>/<version>.fhb, and it can be edited by hand.
The next export of that version writes it anew from what stands in the game.
See also: Themes, The datapack.