-
Notifications
You must be signed in to change notification settings - Fork 12
Block Families
Block families are a way to add random mixes of blocks to dungeons, similar to the way vanilla "dungeons" mix normal and mossy cobblestone. They group related blocks that will then be select from randomly for each block placed while building with the family. Of course, related can mean whatever you want, really this just groups blocks that will be mixed when building.
Block families are stored in JSON files (yes, I actually used a standard format for once), and simply list all the blocks in the family. For example, here is the code from mixedcobble.json, which imitates the the mix of cobblestones types found in vanilla dungeons:
{ "name": "mixed_cobble", "blocks": [ "minecraft:cobblestone", "minecraft:mossy_cobblestone" ] }
The name field tells the name used to reference the block family in theme files; this would be called $mixed_cobble to use it in a theme, where it would added to a block list as though it were a single block. The block names are the resource locations used by Minecraft, and can be blocks from mods (simple replace "minecraft" with the mod ID). Sub-blocks (alternate block states) can be reference through metadata by placing the metadata number in parentheses after the resource location, just like in theme block lists. For example:
{ "name": "mixed_bricks_3", "blocks": [ "minecraft:stonebrick", "minecraft:stonebrick(1)", "minecraft:stonebrick(2)" ] }
Any number of blocks can be included, and they can be duplicated to increase the chance of a block being used. A cool use for this would be using all variants of the Chisel mod's hieroglyphics block to create walls of believable (though meaningless) hieroglyphic writing.
Block families are found under config/DLDungeonsJBG/BlockFamilies, and must be there to work, otherwise the mod won't find them.
Unlike many other thing, block families are work exactly the same in new versions (for Minecraft 1.19.4+) as they do in 1.12.2; the only difference is that they must now be in a data pack (folder data/dldungeonjbg/theming/block_families) in the newer versions.