Better Ore Generation

The new ore spawn settings are defined in JSON format in config/orespawn/*.json (where * is any filename).
The basic format of the ore-spawn.json file is this:

 { "dimensions":[ { "dimension":0, "ores":[ { "blockID":"minecraft:emerald_ore",
 "size":1, "variation":0, "frequency":8, "minHeight":4, "maxHeight":32, 
"biomes":["Extreme Hills Edge","Extreme Hills"] } ] } ] }

Variables

dimensions: Array of JSON objects that each describe ore spawns for that dimension

dimension: Which dimension you want the following ores to spawn in. If you set the dimension to + instead of a specific number, then the ore settings will apply to all dimensions not already covered by this config file.

ores: An array of ore spawn objects

blockID: This is the identifier for the block, in the format of mod-ID:block-name where mod-ID is the ID of the mod (minecraft is the ID for vanilla minecraft blocks) and the block-name is the name of a block. Basically, the blockID is the text that you would use in the the /give command,

size: This is the number of ore blocks per deposit.

variation: This is how much to randomly vary the number of blocks when spawning an ore deposit.

frequency: This is the maximum number of deposits to spawn per chunk. If this number is less than one, then this is the fraction of chunks that have a spawn deposit in it (e.g. "frequency":0.1 will cause 1 ore deposite per every 10 chunks). Note that if you set the maxHeight to a number greator than 64, then the actualy number of ore deposits per chunk will be fewer than the frequency value because some of the deposits will have spawned in the air above ground.

minHeight: This is the lowest Y-coordinate that the ore is allowed to spawn at.

maxHeight: This is the highest Y-coordinate that the ore is allowed to spawn at.

biomes: (optional) Array of biomes (by name) where this ore is allowed to spawn. You can specify an empty array [] or simply leave off this variable if you want the ore to spawn in all biomes.

Here's what the default Minecraft ore spawning behavior looks like as an ore-spawn JSON:

 { "dimensions":[ { "dimension":0, "ores":[ { "blockID":"minecraft:coal_ore", 
"size":25, "variation":12, "frequency":20, "minHeight":0, "maxHeight":128, 
"biomes":[] }, { "blockID":"minecraft:iron_ore", "size":8, "variation":4, 
"frequency":20, "minHeight":0, "maxHeight":64, "biomes":[] }, 
{ "blockID":"minecraft:gold_ore", "size":8, "variation":2, "frequency":2, 
"minHeight":0, "maxHeight":32, "biomes":[] }, 
{ "blockID":"minecraft:diamond_ore", "size":6, "variation":3, "frequency":1, 
"minHeight":0, "maxHeight":16, "biomes":[] }, 
{ "blockID":"minecraft:redstone_ore", "size":6, "variation":3, "frequency":8, 
"minHeight":0, "maxHeight":16, "biomes":[] }, 
{ "blockID":"minecraft:lapis_ore", "size":5, "variation":2, "frequency":1, 
"minHeight":0, "maxHeight":32, "biomes":[] }, 
{ "blockID":"minecraft:emerald_ore", "size":1, "variation":0, "frequency":8, 
"minHeight":4, "maxHeight":32, "biomes":["Extreme Hills Edge","Extreme Hills"] }, 
{ "blockID":"minecraft:dirt", "size":112, "variation":50, "frequency":10, 
"minHeight":0, "maxHeight":255, "biomes":[] }, 
{ "blockID":"minecraft:gravel", "size":112, "variation":50, "frequency":8, 
"minHeight":0, "maxHeight":255, "biomes":[] }, 
{ "__comment":"granite", "blockID":"minecraft:stone", "blockMeta":1, 
"size":112, "variation":50, "frequency":10, "minHeight":0, "maxHeight":255, 
"biomes":[] }, { "__comment":"diorite", "blockID":"minecraft:stone", 
"blockMeta":3, "size":112, "variation":50, "frequency":10, "minHeight":0, 
"maxHeight":255, "biomes":[] }, { "__comment":"andesite", 
"blockID":"minecraft:stone", "blockMeta":5, "size":112, "variation":50, 
"frequency":10, "minHeight":0, "maxHeight":255, "biomes":[] }, ] }, 
{ "dimension":-1, "ores":[ { "blockID":"minecraft:quartz_ore", "size":15, 
"variation":4, "frequency":7, "minHeight":0, "maxHeight":128, 
"biomes":[] } ] } ] }

Note that if you want to use orespawn .json config files to spawn ores from other mods or vanilla Minecraft, you need to disable ore spawning for the other mod in question or the ores will be generated twice (vanilla Minecraft ore generation can be disabled by setting the config option disable_standard_ore_generation=true).

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License