Skip to content
xyroc edited this page Nov 8, 2025 · 2 revisions

Important

This page is part of the older wiki for 2.2.x versions of the mod. Not all the concepts introduced carry over to newer versions.

Custom Themes

A theme defines the primary look of a dungeon. A large part of the blocks used in a dungeon are determined by a theme.

Dungeon Crawl already comes with a default set of themes, including the Default, Bricks I and II, Desert and Badlands themes. You can overwrite any existing theme by overwriting its file through a datapack in the same way you would overwrite loot tables. Simply create a new file with the same name in the same place as the original.

You can also add entirely new themes. Those have to be located somewhere in data/dungeoncrawl/theming/, preferably in data/dungeoncrawl/theming/themes/.

Each theme has a unique ID. These IDs are completely independent from all other IDs Dungeon Crawl uses (e.g. model ids, sub-theme ids, randomizer ids, etc..). If a theme uses an ID that is already in use by another theme, it will override that theme. For example, if you were to override the default theme with the id zero, then you could create a new theme with the same id (zero) instead of overwriting the file and it will replace the original theme.

Please note that the success of overriding a theme purely by id depends on the order in which the files get loaded. Because of that, it is highly recommended to overwrite themes directly by creating the new theme in the same path where the original is located.

Overriding the same ID multiple times is not recommended and does not have any use.

To see a list of all used theme ids, visit the IDs section.

A theme does have the parameters "normal", "normal_2", "solid", "stairs", "solid_stairs", "slab", "solid_slab", "floor", "material", and "wall":

Name Use Case
normal A non-solid block
normal_2 Used rarely, obsidian (non-solid)
solid A solid block
stairs Non-solid stairs
solid_stairs Solid stairs
slab Non-solid slabs
solid_slab Solid slabs
floor The floor (non-solid)
material Currently only used as loot in chests. (Loot function "dungeoncrawl:material_blocks") (non-solid)
wall A wall block (e.g. cobblestone wall). Used rarely, if at all. (non-solid)

Solid blocks replace air during the dungeon generation while non-solid ones do not. View the models section for more information.

To create a theme, you will have to assign a value to each of those parameters. Each parameter can either have a value of the type "block" or of the type "random_block". As you probably expected, the "block" type does contain exactly one block while the "random_block" type contains multiple "block" type entries that have a weight value. The weight value defines, how likely an entry is to be chosen from all others. The higher the weight the higher the chance. If entry A has twice the weight of entry B, then chance of entry A to be chosen is twice as high as the chance of entry B.

Here is an example for the "block" and "random_block" types: (The parameter "normal" is assigned a value of the type "block", while "solid" is assigned one of the type "random_block")

{
    "normal": {
        "type": "block",
        "block": "minecraft:cobblestone"
    },
    "solid": {
        "type": "random_block",
        "blocks": [
            {
                "block": "minecraft:stone_bricks",
                "weight": 1
            },
            {
                "block": "minecraft:cracked_stone_bricks",
                "weight": 3
            }
        ]
    }
}

In the final theme file, all these block parameters need to be placed inside of a "theme" object:

{
   "theme": {
      "normal": {
         "type": "block",
         "block": "minecraft:cobblestone"
      },
      "solid": {...},
      etc...
   }
}

If you wish, you can also add extra BlockState data to a block entry. The given properties will then be applied to the block (if applicable). Example:

{
    "type": "block",
    "block": "minecraft:smooth_stone_slab",
    "data": {
        "type": "double"
    }
}

Notice the "data" section in the block entry.

To find out the names of a block's properties and its values, inspect a block ingame with F3 and look at the properties on the right.

Now, all that remains to do is to assign a value to each block parameter, set a value for the "id" field and set "type" to "theme" to mark the file as a theme file.

A complete theme could look like this:

{
  "type": "theme",
  "id": 0,
  "theme": {
    "normal": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone",
          "weight": 3
        },
        {
          "block": "minecraft:stone_bricks",
          "weight": 2
        },
        {
          "block": "minecraft:cracked_stone_bricks"
        }
      ]
    },
    "normal_2": {
      "type": "block",
      "block": "minecraft:obsidian"
    },
    "solid": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:stone_bricks",
          "weight": 4
        },
        {
          "block": "minecraft:cracked_stone_bricks",
          "weight": 2
        }
      ]
    },
    "floor": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:stone_bricks",
          "weight": 2
        },
        {
          "block": "minecraft:cracked_stone_bricks"
        }
      ]
    },
    "stairs": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone_stairs",
          "weight": 4
        },
        {
          "block": "minecraft:stone_brick_stairs",
          "weight": 4
        }
      ]
    },
    "solid_stairs": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:stone_brick_stairs",
          "weight": 3
        },
        {
          "block": "minecraft:cobblestone_stairs"
        }
      ]
    },
    "material": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone",
          "weight": 3
        },
        {
          "block": "minecraft:stone_bricks",
          "weight": 3
        },
        {
          "block": "minecraft:gravel",
          "weight": 2
        }
      ]
    },
    "slab": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone_slab",
          "weight": 2
        },
        {
          "block": "minecraft:stone_brick_slab"
        }
      ]
    },
    "solid_slab": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone_slab"
        },
        {
          "block": "minecraft:stone_brick_slab"
        }
      ]
    },
    "wall": {
      "type": "random_block",
      "blocks": [
        {
          "block": "minecraft:cobblestone_wall"
        },
        {
          "block": "minecraft:stone_brick_wall"
        }
      ]
    }
  }
}

Requiring Sub-Themes

As of version 2.1.0, a theme can require that it will always be used together with a specific sub theme.

To clarify this: Theme A requiring sub-theme C, means that as soon as theme A is used for a dungeon layer, sub-theme C will be used automatically for that layer as well. This is only one-directional, so if sub-theme C gets used for a dungeon layer, it does not necessarily mean that theme A will be used for it as well.

The current use case for this is the nether layer, since the nether theme should always be used together with the nether sub-theme.

A sub theme can be required by placing a "sub_theme" field in the json file and assigning it the id of a specific sub theme or the id of a sub theme randomizer.

{
   "type": "theme",
   "id": 0,
   "sub_theme": 2,
   "theme": {}
}

Once you have your finished theme file, place it in the datapack directory data/dungeoncrawl/theming/themes/ or any subdirectory of it. Generally, all theming-related files (themes, sub-themes, randomizers, mappings) have to be located somewhere in data/dungeoncrawl/theming/.

Clone this wiki locally