Before you read this, I'm expecting you to have read the CoFH World Generation Users Manual. This guide isn't meant to be a replacement for it - although I will be going over the basics of Ore Generation here, it won't go nearly as in depth of the mechanics of basic ore generation as @unknown zombie did.
However, we will instead be covering some of the more recent additions to the CoFH Core user's arsenal. These various templates and generators allow for a whole new realm of generation of... well, whatever we want.
CoFHCore places its ore generation files inside of the "minecraft/config/cofh/world" folder. Here, you'll usually just find the Vanilla.json file, or if you've got Thermal Foundation installed, you'll also find the ThermalFoundation-Ores.json file.
Both of these files are JSONs. As I'm assuming you've read the required reading above, I expect you to know what at least some of the fields found in these files do. However, the fields available have changed quite a bit since then. Here, you'll find an example Vanilla.json file, with only Iron Ore enabled:
This produces, well, your regular Iron veins:
This should look fairly similar to the JSONs you saw in Unknown Zombie's guide. However, thanks to more recent additions to CoFH Core, this JSON can be re-written like this:
At a glance, you'll see that this new format isn't all that different then the previous, but there are two rather important things I'd like to point out.
You'll notice that under "template," instead of just stating that we want Uniform generation, we've created an Object. This Object defines two things: the type and the generator. The type should look familiar - it's just the template we defined before. The generator should seem familiar as well - it's just the clusters we've always been generating.
Everything else should look almost exactly the same as the other ores you've been generating throughout the years. However, exactly the same isn't what you're here for. You want to know what these new things do, and how to manipulate them. I'm happy to provide many examples as to what you can do with these neat new toys.
When I first noticed these new possibilities for generation, I immediately singled out the Fractals and Large Veins as the things I wanted to try first. If you've ever played Phoenix Reborn, you should very well know that I'm up for crazy things when it comes to Ore Generation, so these two options naturally appealed to me.
When looking at this brand new JSON, one of the first things you should notice is that we've finally made the move off of Uniform generation and into Fractals. Combined with that, you'll notice that we as well modified the "cluster" generator to produce the "large-vein" generator. We've even gone as far as tacking another variable onto the end of the object.
As you can probably tell, we are diving much more heavily into the editing of the beginning object. This example JSON demonstrates how we can use the Decoration type and generator to create various plants, such as our wonderful dry land, iron infused sugar cane:
Although having stacks of iron ore laying about is great, perhaps we should make it seem more natural. We could take a page out of Tinkers' Construct's book with its gravel ores. They use the "surface" type when generating their ores, which is something we'll take a look at now:
This JSON is significantly easier than the last one - especially the object. As you can see, we've returned to the cluster generator to create small veins of these ores - however, these are going to be exposed to the surface, rather than laying about underground.
Another interesting style of Generation are interesting objects called "spikes." We'll once again use the "surface" type to generate these guys, but we'll switch the generator over to spikes:
We'll conclude our foray into surface generation by generating some solid metal trees. For this, we will yet again continue to use the "surface" type, but we'll instead be using the "small-tree" generator, which is the kind Minecraft uses to generate regular oak and birch trees.
Now that we've brightened up the surface, its time we took some steps to liven up the underground as well. We're going to be doing this by using the "stalactite" generator, coupled with the "cave" type, so that we can have stalactites appearing in the caves. Now, just for a refresher - stalactites hang down from the ceiling while the stalagmites rise up from the ground.
((I'm just going to pause here. More coming in the coming days.))
However, we will instead be covering some of the more recent additions to the CoFH Core user's arsenal. These various templates and generators allow for a whole new realm of generation of... well, whatever we want.
CoFHCore places its ore generation files inside of the "minecraft/config/cofh/world" folder. Here, you'll usually just find the Vanilla.json file, or if you've got Thermal Foundation installed, you'll also find the ThermalFoundation-Ores.json file.
Both of these files are JSONs. As I'm assuming you've read the required reading above, I expect you to know what at least some of the fields found in these files do. However, the fields available have changed quite a bit since then. Here, you'll find an example Vanilla.json file, with only Iron Ore enabled:
Code:
{
"iron": {
"template": "uniform",
"block": "iron_ore",
"material": "minecraft:stone",
"clusterSize": 8,
"numClusters": 20,
"minHeight": 0,
"maxHeight": 64,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
This should look fairly similar to the JSONs you saw in Unknown Zombie's guide. However, thanks to more recent additions to CoFH Core, this JSON can be re-written like this:
Code:
{
"iron": {
"template": {"type": "uniform", "generator": "cluster"},
"block": "iron_ore",
"material": "stone",
"clusterSize": 8,
"numClusters": 20,
"minHeight": 0,
"chunkChance": 1,
"maxHeight": 64,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
You'll notice that under "template," instead of just stating that we want Uniform generation, we've created an Object. This Object defines two things: the type and the generator. The type should look familiar - it's just the template we defined before. The generator should seem familiar as well - it's just the clusters we've always been generating.
- The "Type" determines the distribution of blocks when generated. Aside from the regular "uniform" template, there are also templates such as "normal," "cave," "fractal," and "surface."
- The "Generator" determines what the groups of blocks actually appear as once generated. These generators can range from small trees, to dungeons, to geodes, and to your regular old veins.
Everything else should look almost exactly the same as the other ores you've been generating throughout the years. However, exactly the same isn't what you're here for. You want to know what these new things do, and how to manipulate them. I'm happy to provide many examples as to what you can do with these neat new toys.
When I first noticed these new possibilities for generation, I immediately singled out the Fractals and Large Veins as the things I wanted to try first. If you've ever played Phoenix Reborn, you should very well know that I'm up for crazy things when it comes to Ore Generation, so these two options naturally appealed to me.
Code:
{
"iron": {
"template": {"type": "fractal", "generator": "large-vein", "sparse": false},
"block": "iron_ore",
"material": "minecraft:stone",
"clusterSize": 50,
"numClusters": 120,
"chunkChance": 350,
"minHeight": 0,
"veinHeight": 40,
"veinDiameter": 48,
"verticalDensity": 15,
"horizontalDensity": 15,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
- The Fractal generation type creates large almost clouds of ore, called veins by its options. These veins are just general areas and parameters in which the ore can spawn. It has several sub-variables that we've added on in the rest of the JSON:
- veinDiameter does what you would expect - it defines the maximum horizontal length of the "vein" clouds.
- horizontal & verticalDensity determine how far apart the clouds of blocks are in the veins. This isn't actually defined in terms of blocks, so it's recommended that you experiment to find the desired result.
- The "large-vein" generator removes the vein size limitations on the regular cluster generator. If you've ever played with CoFH Ore Generation like I have, you'll probably have notice that the cluster size of the cluster generator is limited to 32 blocks. However, once you make the move over from cluster to large-vein, you'll find that limitation removed - you'll be able to create clusters as large as you want.
- When you use the "large-vein" generator, you'll also need to add the "sparse" boolean into the object. This essentially determines whether or not the larger veins will be more closely packed and denser or more spread out.
Ever feel like the overworld is bland? Filled with flower after flower, without a single glimmering piece of metal in sight when you spawn? Well, you needn't worry. CoFH Core is capable of blinging up your overworld with whatever block you so choose. Keeping in theme with our previous JSONs, we'll be using Iron again for this endeavour.
Code:
{
"iron": {
"template": {"type": "decoration", "generator": "decoration", "genSurface": "grass", "genSky": "true", "checkStay": "false", "stackHeight": 2, "xVariance": 8, "yVariance": 4, "zVariance": 8},
"block": "iron_ore",
"material": "air",
"clusterSize": 3,
"numClusters": 20,
"chunkChance": 1,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
- The Decoration type and generator are meant to be used and generally only work when together. They are an extension of the Surface type, which we'll get into later. The decoration type is used to generate things like flowers, sugar cane, tall grass, and basically any plant you'll end up finding on the surface. However, we're using it here to generate iron.
- This generator adds a whole heap of things to the object - however, there's only going to be more added from here. The first, genSurface, determines which block the "plant" can spawn on. In this instance, we're having our iron spawn on top of grass, so we use grass.
- genSky is a boolean which determines if this "plant" can generate without needing a path to the sky. If it's false, it can generate in the dark. If it's true, the plant will need a skylight in order to appear.
- checkStay is only useful when you are actually using plants. If true, this boolean makes sure that the plant can only generate on blocks that sustain it - like sugar cane next to water.
- stackHeight is used when you need more than one block in the tower - ex three high sugar cane or cactus. We've used it here to generate two high iron ore stacks.
- The x, y, and zVariance determine how spread out a group of blocks can be, f'rinstance a group of three sugar cane on three adjacent blocks or two cactus several meters apart.
- You should also note that when using this generator type, the clusterSize variable determines how many plants generate - for example the three seen in the screenshot.
Although having stacks of iron ore laying about is great, perhaps we should make it seem more natural. We could take a page out of Tinkers' Construct's book with its gravel ores. They use the "surface" type when generating their ores, which is something we'll take a look at now:
Code:
{
"iron": {
"template": {"type": "surface", "generator": "cluster", "followTerrain": "true"},
"block": "iron_ore",
"material": [
"minecraft:stone",
"minecraft:grass",
"minecraft:dirt",
"minecraft:sand",
"minecraft:snow",
"minecraft:water",
"minecraft:air"
],
"clusterSize": 8,
"numClusters": 20,
"minHeight": 0,
"chunkChance": 1,
"maxHeight": 80,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
- The "surface" type is a less complex version of the decoration type. It's simply equivalent to an exposed version of the regular uniform generation.
- It does, however, add one variable into the object, this time called "followTerrain." This variable is quite simple - if true, the clusters will be able to replace "soft" blocks - things like grass or flowers. If false, the clusters will generate around them.
Another interesting style of Generation are interesting objects called "spikes." We'll once again use the "surface" type to generate these guys, but we'll switch the generator over to spikes:
Code:
{
"iron": {
"template": {"type": "surface", "generator": "spike", "minHeight": 7, "heightVariance": 4, "sizeVariance": 4, "positionVariance": 4, "largeSpikes": "true", "largeSpikeChance": 60, "minLargeSpikeHeightGain": 10, "largeSpikeHeightVariance": 30, "largeSpikeFillerSize": 1},
"block": [
{"name": "iron_ore", "weight":80},
{"name": "gold_ore", "weight":20}
],
"material": [
"minecraft:stone",
"minecraft:grass",
"minecraft:dirt",
"minecraft:sand",
"minecraft:snow",
"minecraft:water",
"minecraft:air"
],
"clusterSize": 1,
"numClusters": 4,
"minHeight": 0,
"chunkChance": 1,
"maxHeight": 80,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
- As you can tell, we're once again adding a bunch of things to the object with the "spike" generator. We'll break these down one by one:
- minHeight determines the minimum size of the spike. Here we have 7 - so each spike is going to be at least seven blocks tall.
- heightVariance determines the possible amount of blocks the spikes can gain. So, with out heightVariance set to 4, the spikes will be anywhere from 7 to 11 blocks tall.
- sizeVariance is basically the same thing, except instead of adding blocks to the top of the spike, it adds it to the bottom.
- positionVariance is a number that gives the potential offset of the spikes along the Y axis
- largeSpikes is a boolean that determines if large spikes are possible.
- largeSpikeChance is a number that determines the chance of large spikes spawning, if the large spikes are enabled. One in every [number] of spikes will be a large spike.
- minLargeSpikeHeightGain is the minimum number of blocks the spikes will extend above regular spikes.
- largeSpikeHeighVariance is the amount of blocks that can possibly be added to the minLargeSpikeHeightGain.
- largeSpikeFillerSize determines the amount of extra layers that large spikes can have over the regular spikes.
We'll conclude our foray into surface generation by generating some solid metal trees. For this, we will yet again continue to use the "surface" type, but we'll instead be using the "small-tree" generator, which is the kind Minecraft uses to generate regular oak and birch trees.
Code:
{
"iron": {
"template": {"type": "surface", "generator": "small-tree", "genMaterial": "air", "leaves": "emerald_block", "minHeight": 5, "heightVariance": 3, "treeChecks": "false", "relaxedGrowth": "true", "waterLoving": "false", "leafVariance": "true"},
"block": [
{"name": "iron_ore", "weight":80},
{"name": "gold_ore", "weight":20}
],
"material": [
"minecraft:stone",
"minecraft:grass",
"minecraft:dirt",
"minecraft:sand",
"minecraft:snow",
"minecraft:water",
"minecraft:air"
],
"clusterSize": 1,
"numClusters": 4,
"minHeight": 0,
"chunkChance": 1,
"maxHeight": 80,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
- Trees are abound with the small-tree generator, and with it come many additions to the object. The trees themselves are generated similarly to regular oak and birch trees, so they won't look too out of the ordinary in minecraft.
- genMaterial is similar to the regular material mentioned below, but it determines what blocks the leaves can replace. For this, we'll just be using air.
- leaves should be fairly self explanatory. This field allows you to select what the leaves are made out of. We'll be going with emerald blocks here to keep the theme of green leaves.
- minHeight decides the minimum height of the tree's trunk
- heightVariance determines how many blocks can possibly be added to the tree's height. Birch Trees, for instance, have a higher heightVariance than the oak trees, allowing them to be higher in general, but not always.
- treeChecks is a boolean that will prevent the trees from generating in spots where they cannot "grow," ex a low light level or too many blocks surrounding them.
- relaxedGrowth allows the bottommost "log" of the tree to generate with blocks surrounding it, which is what allows (for example) the trees in swamps to grow with water around the bottom log.
- waterLoving is another boolean that swamp trees use - it allows them to generate even deeper in water, and it's even possible for them to generate with all the way up to the leaves underwater.
- leafVariance is the final boolean, and it simply allows leaf blocks to go missing from the corners of trees, giving them a more rounded look.
Now that we've brightened up the surface, its time we took some steps to liven up the underground as well. We're going to be doing this by using the "stalactite" generator, coupled with the "cave" type, so that we can have stalactites appearing in the caves. Now, just for a refresher - stalactites hang down from the ceiling while the stalagmites rise up from the ground.
Code:
{
"iron": {
"template": {"type": "cave", "generator": "stalagtite", "genBody": "air", "minHeight": 7, "heightVariance": 4, "genSize": 0, "heightMod": 5, "sizeVariance": 2, "smooth": "false", "fat": "false"},
"block": [
{"name": "ThermalFoundation:Ore", "metadata": 2, "weight":80},
{"name": "ThermalFoundation:Ore", "metadata": 3, "weight":20}
],
"material": [
"minecraft:stone",
"minecraft:air"
],
"clusterSize": 1,
"numClusters": 4,
"minHeight": 0,
"chunkChance": 1,
"maxHeight": 80,
"retrogen": "true",
"biomeRestriction": "none",
"biomes": [],
"dimensionRestriction": "blacklist",
"dimensions": [
-1,
1
]
}
}
((I'm just going to pause here. More coming in the coming days.))