CobbleGen
An MC mod that allows you to customise/randomise cobblestone (basalt and stone) generator.
About
CobbleGen is an MC mod that allows you to customise/randomise cobblestone (basalt and stone) generator.
As of v5.0, CobbleGen is officially supported for both Fabric-like and Forge-like modloaders. Because of how the mod is designed, the mod should still work on future versions of Minecraft, just don't expect integration (such as Create mod integration, REI/EMI/JEI integration) to work properly. Click here to see detailed version tracker.
The Fabric JAR should work on Quilt, the mod is designed to only rely on Vanilla code as much as possible.
The Forge JAR should also work on NeoForge (1.20.1 only). Support for Forge (1.20.2+ only) will be stopped at v5.2, please consider migrating to NeoForge!
Features
- Supports Fabric/Quilt and NeoForge/Forge
- REI/EMI/JEI Integration
- Customisable cobblestone, stone, and basalt generator
- Randomised the generated block with a customisable weight value
- Customisable modifier to give your players more challenge
- Dimension whitelist/blacklist
- Y-level limiter
- Supports tag (put
#mod_id:tag_id
instead of puttingmod_id:block_id
) - Supports Create mod
- Pipe/Pump support
- Porting Lib compatibility on Fabric/Quilt (Fixes Limestone and Scoria Generators)
- Advanced custom generator (custom fluid interaction)
- Fluid Interaction API for developers
More features are coming soon!
Planned Features
- Modifier(s) position (No longer limited to "below generated block")
- Webapp for modpack developers to easily configure the generators
- Biome whitelist/blacklist
Usage
This mod is mostly server-side, but it's recommended to also have it installed in the client-side for REI/EMI/JEI support.
Out of the box the mod doesn't do much, it will generate default config where cobblegen generates deepslate at deepslate level, random ores when there's bedrock underneath generated block, etc. To use the mod to its full potential you need to configure it yourself.
Configuration
The mod provide you with 3 layers of config: default, custom, and advanced.
- Default: The most basic modification, it lets you to replace vanilla generated block. E.g. tell the gen to generate Diamond Block instead of Cobblestone.
- Custom: Lets you to modify the generator's modifier, similar to how you require to have Soul Soil to generate Basalt, but works with any type of generator. E.g. tell the gen to generate Ores when the block is generated above Bedrock.
- Advanced: Lets you to modify fluid interaction, you can use it to use modded fluid to generate a block. E.g. tell the gen to generate Diamond Block if Honey fluid touches Milk fluid.
The config file is located in config/cobblegen.json5
, the format should be pretty straightforward:
Format
Default Generators format
{
"id":"mod_id:block_id",
"weight":95.5,
"dimensions":[
"mod_id:dimension_id",
"mod_id:dimension_id"
],
"excludedDimensions":[
"mod_id:dimension_id",
"mod_id:dimension_id"
],
"minY":0,
"maxY":69
}
Custom Generators format
{
"generatorType (cobbleGen/stoneGen/basaltGen)":{
"mod_id:modifier_block_id":[
{
"id":"mod_id:block_id",
"weight":95.5,
"dimensions":[
"mod_id:dimension_id",
"mod_id:dimension_id"
],
"excludedDimensions":[
"mod_id:dimension_id",
"mod_id:dimension_id"
],
"minY":0,
"maxY":69
}
]
}
}
Explanation
- All but
id
andweight
are optional, you can remove them if you don't need it, for example:{ "id": "minecraft:bedrock", "weight": 1.0, // as you can see, there's only id and weight here }
- Custom gen only:
generatorType
: Need to be replaced by either cobbleGen, stoneGen, or basaltGenmod_id:modifier_block_id
: Need to be replaced by modifier block id of your choice (e.g.minecraft:bedrock
)
id
: Block id of the generated block (e.g.minecraft:iron_ore
)weight
: Weight of the generated block (bigger number = more common)dimensions
: Collection of dimension ids where the block can be generated (It's an array!, e.g.["minecraft:the_end", "minecraft:nether"]
)excludedDimensions
: Collection of dimension ids where the block can NOT generate (It's an array!, e.g.["minecraft:the_end", "minecraft:nether"]
)minY
: How deep can this block be generated (e.g.0
means can only be generated from height limit to Y=0 (inclusive))maxY
: How high can this block be generated (e.g.0
means can only be generated from bedrock level to Y=0 (inclusive))
Default Generators Examples (Cobble/Stone/Basalt)
{
// Cobblestone Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"cobbleGen": [
{
"id": "minecraft:cobbled_deepslate",
"weight": 100.0,
"maxY": 0
}
],
// Stone Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"stoneGen": [
{
"id": "minecraft:stone",
"weight": 100.0
}
],
// Basalt Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"basaltGen": [
{
"id": "minecraft:basalt",
"weight": 100.0
}
]
}
Custom Generators Examples (with modifiers)
{
// Custom Generator
// <stoneGen|cobbleGen>: { <modifier block id>: [ { "id": <block id>, "weight": <randomness weight> }, ... ] }
"customGen": {
// Cobblestone Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"cobbleGen": {
"minecraft:bedrock": [
{
"id": "minecraft:emerald_ore",
"weight": 2.0
},
{
"id": "minecraft:diamond_ore",
"weight": 5.0
},
{
"id": "minecraft:lapis_ore",
"weight": 8.0
},
{
"id": "minecraft:gold_ore",
"weight": 10.0
},
{
"id": "minecraft:iron_ore",
"weight": 15.0
},
{
"id": "minecraft:coal_ore",
"weight": 20.0
},
{
"id": "minecraft:cobblestone",
"weight": 40.0
}
]
},
// Stone Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"stoneGen": {
"minecraft:bedrock": [
{
"id": "minecraft:stone",
"weight": 40.0
},
{
"id": "minecraft:diorite",
"weight": 20.0
},
{
"id": "minecraft:andesite",
"weight": 20.0
},
{
"id": "minecraft:granite",
"weight": 20.0
}
]
},
// Basalt Generator
// { "id": "mod_id:block_id", "weight": 95.5 }
"basaltGen": {
"minecraft:bedrock": [
{
"id": "minecraft:end_stone",
"weight": 100.0,
"dimensions": [
"minecraft:the_end"
]
},
{
"id": "minecraft:blackstone",
"weight": 100.0,
"excludedDimensions": [
"minecraft:the_end"
]
}
]
}
}
}
Advanced Custom Generators (Custom Fluid Interaction) Examples
{
// Advanced Custom Generator (Custom Fluid Interaction)
// Basic format:
// "advanced": { <source fluid id>: { <neighbour fluid/block id>: { results: {<modifier block id>: [ { "id": <block id>, "weight": <randomness weight> }, ... ] } } } }
"advanced": {
// Make sure to use still version of the fluid for this one,
// - "minecraft:lava" not "minecraft:flowing_lava"
// - "milk:still_milk" not "milk:flowing_milk"
// How the fluid's ID is constructed depends on how the corresponding mod creator does things.
"minecraft:lava": {
// replicates minecraft cobblestone and stone generator
// This one can be flowing or still version of the fluid, if still doesn't work try flowing.
"minecraft:water": {
// stone generator
"resultsFromTop": {
"*": [ // wildcard, accept any block as modifier
{
"id": "minecraft:stone",
"weight": 100.0,
}
]
},
// cobblestone generator
"results": {
"*": [ // wildcard, accept any block as modifier
{
"id": "minecraft:cobblestone",
"weight": 100.0,
}
]
}
},
// replicates minecraft basalt generator
"b:minecraft:blue_ice": {
"results": {
"minecraft:soul_soil": [
{
"id": "minecraft:basalt",
"weight": 100.0,
}
]
}
},
// custom andesite generator with basalt generator method
"b:minecraft:water_cauldron": {
"silent": true, // prevent extinguish sound from playing
"results": {
"*": [
{
"id": "minecraft:andesite",
"weight": 100.0,
}
]
}
}
}
}
}
Compatibility
Any mods that modify fluid interaction behaviour potentially have a conflict with CobbleGen. With the exception of Porting Lib (the Create mod).
Starting from v4.0, CobbleGen should work with most mods that modify fluid interaction.
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+