> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# World generation

> Ores that generate in veins in new chunks, shaped like vanilla's.

`generate:` makes a block appear in veins in newly generated chunks, like vanilla ores. The veins are placed by vanilla's own ore code, so they're shaped exactly like iron or coal veins.

```yaml items/ores/ruby_ore.yml theme={null}
ruby_ore:
  type: block
  texture: ruby_ore.png
  hardness: 3
  generate:
    height: -64..16                    # Y range
    veins: 6                           # veins per chunk
    size: 8                            # blocks per vein
    deepslate: ruby_deepslate_ore      # the version used inside deepslate

ruby_deepslate_ore:
  type: block
  texture: ruby_deepslate_ore.png
  hardness: 4.5
```

> [!WARNING]
>
> Only **new chunks** get veins. Chunks that were already generated are left as they are, so explore new land or start a new world to find the ore.

## Options

**height** `range` (default: -64..64)

The lowest and highest Y a vein can start at, like `-64..16` (`-64 to 16` works too). Veins are spread evenly across the range. The default is `10..117` in the nether and `0..128` in the end. Parts of the range outside the world are ignored.

**veins** `number` (default: 4)

How many veins each chunk tries to place, from 0 to 256. Fractions work: `0.5` is a vein in about every other chunk, `2.3` is 2 per chunk plus a third one 30% of the time. For comparison, vanilla iron is around 10 and diamonds around 7 below Y 16.

**size** `number` (default: 8)

How many blocks a vein tries to place, from 1 to 64. Vanilla coal is 17, iron 9, diamond 4 to 12. Only blocks it can replace (see `replace`) become ore, so real veins are often smaller.

**deepslate** `block id`

Another Lode Items block to use where the vein runs through deepslate and tuff, like vanilla's deepslate ores. Without it, the block itself is used there too. Overworld only.

**replace** `list`

The blocks a vein may replace, by id or `#tag`:

```yaml theme={null}
replace: [stone, andesite, "#minecraft:base_stone_overworld"]
```

Without it, a vein replaces what vanilla ores replace: stone, granite, diorite, andesite, deepslate and tuff in the overworld, netherrack, basalt and blackstone in the nether, and end stone in the end. If you set `replace`, deepslate is only replaced when `deepslate:` is given too.

**dimension** `text` (default: overworld)

`overworld`, `nether` or `end`. Each rule generates in worlds of that kind only.

**worlds** `list`

Only these worlds, by name: `worlds: [world, mining]`. Without it, every world of the right dimension, including ones loaded later.

**biomes** `list`

Only in these biomes, by id or `#tag`: `biomes: [desert, "#minecraft:is_badlands"]`. The biome is checked where each vein starts.

**hidden** `0 to 1` (default: 0)

The chance to skip each block that would touch air, so less ore shows in cave walls. Vanilla diamonds use `0.5`, ancient debris `1`.

## Several rules

Give a list to generate a block in more than one way, for example common small veins high up and rare big ones deep down, or once in the overworld and once in the nether:

```yaml theme={null}
ruby_ore:
  type: block
  texture: ruby_ore.png
  generate:
    - height: 0..64
      veins: 4
      size: 6
    - height: -64..0
      veins: 1.5
      size: 14
      hidden: 0.5
      deepslate: ruby_deepslate_ore
    - dimension: nether
      replace: [netherrack]
      veins: 8
```

## Good to know

* Generated ore is a normal custom block. It costs the same as stone to store, and it [drops](https://items.lodemc.net/blocks/mining-and-drops.md#drops) and mines like a placed one.
* Changes to `generate:` apply on `/lodeitems reload`, but only to chunks generated after that.
* A mistake in one rule (an unknown biome, a `deepslate:` that isn't a Lode Items block) skips that rule and says why. The block itself still loads.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.