Skip to content

Configuration (V1)

Ahmad Ansori Palembani edited this page Sep 6, 2024 · 3 revisions

CobbleGen provides 3 layers of generator configuration:

  • Normal Generator: Allows you to configure the classic cobble/stone/basalt generator's output
  • Custom Generator: Same as normal gens, but you can specify what block (underneath the generated block, we call it "modifier") is required to generate the block
  • Advanced Generator: Same as custom gens, but you can specify which fluids is required to generate the block

To configure the generators, all you have to do is edit the config file which located in config/cobblegen.json5 in your minecraft instance's folder.

Blocks

The config file is consists of config "blocks"

Root Block

JSON file require you to always open and close the file with {} before adding any blocks.

Example:

{
  // Generator Block
}

Generator Block

As mentioned before, there are 3 different layers of generator: normal, custom, and advanced.

Normal Generator Block

Normal generator block is split into 3: cobbleGen, stoneGen, basaltGen.

Example:

"cobbleGen": [
  // Result Blocks
]
"stoneGen": [
  // Result Blocks
]
"basaltGen": [
  // Result Blocks
]

Result Block

Example:

{
  "id": "minecraft:bedrock"
}

Troubleshoot

Identical key

Say you want to have a cobble generator configuration:

{
  "cobbleGen": [
    {
      "id": "minecraft:cobblestone"
      "weight": 1.0
      "maxY": 1
    }
    {
      "id": "minecraft:cobbled_deepslate"
      "weight": 1.0
      "minY": 0
    }
  ]
}

And you want to add another result block, you don't need to add another "cobbleGen": [ ... ], just append the result block on your previous definition:

// This is INCORRECT
{
  "cobbleGen": [
    {
      "id": "minecraft:cobblestone"
      "weight": 1.0
      "maxY": 1
    }
    {
      "id": "minecraft:cobbled_deepslate"
      "weight": 1.0
      "minY": 0
    }
  ]
  "cobbleGen": [
    {
      "id": "minecraft:iron_block"
      "weight": 1.0
      "minY": 0
    }
  ]
}
// This is CORRECT
{
  "cobbleGen": [
    {
      "id": "minecraft:cobblestone"
      "weight": 1.0
      "maxY": 1
    }
    {
      "id": "minecraft:cobbled_deepslate"
      "weight": 1.0
      "minY": 0
    }
    {
      "id": "minecraft:iron_block"
      "weight": 1.0
      "minY": 0
    }
  ]
}

Because if you add another "cobbleGen": [ ... ] definition, it'd just get ignored by the mod.

Examples

  • Deepslate on Y level 0
{
  "cobbleGen": [
    {
      "id": "minecraft:cobblestone"
      "weight": 1.0
      "maxY": 1
    }
    {
      "id": "minecraft:cobbled_deepslate"
      "weight": 1.0
      "minY": 0
    }
  ]
  "stoneGen": [
    {
      "id": "minecraft:stone"
      "weight": 1.0
      "maxY": 1
    }
    {
      "id": "minecraft:deepslate"
      "weight": 1.0
      "minY": 0
    }
  ]
}