Skip to content

jtorleon-studios-team/cobblestone-generator-tweak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cobblestone Generator Tweak

Tired of your cobblestone generator always giving the same block? This mod tweaks it so generators can produce various stone types and even rare ores.

Default Generators

The mod comes with a set of ready-to-use generators so you can start right away without any configuration.

name file
cobblestone cobblestone.json
andesite andesite.json
diorite diorite.json
gravel gravel.json
sandstone sandstone.json
stone stone.json
mossy cobblestone mossy_cobblestone.json
coal ore coal_ore.json
deepslate coal ore coal_ore_deepslate.json
copper ore copper_ore.json
deepslate copper ore copper_ore_deepslate.json
lapis ore lapis_ore.json
deepslate lapis ore lapis_ore_deepslate.json
redstone ore redstone_ore.json
deepslate redstone ore redstone_ore_deepslate.json

Creating Custom Generators with Datapacks

This mod is fully datapack-driven, which means you can add your own generators without touching the code.

  1. Create a datapack in your datapacks/ folder.
  2. Inside, add your JSON files under: data/bettercobstgen/generator/<name>.json
  3. Define the block probabilities in your JSON. Example:
    {
      "source_block_id": "minecraft:dirt",
      "generation_rules": [
        {
          "generated_block_id": "minecraft:dirt",
          "weight": 1.0
        }
      ]
    }
    • Each generator rule must define a weight.
    • The sum of all weights for a given generator must not exceed 1.0.
    • If the total is higher, the datapack will be considered invalid and ignored.
  4. Reload the datapack (/reload) and your new generator is instantly available.

This way, anyone can create and share custom generators easily, without writing a single line of Java.

You can find an example datapack at the following URL:

About Weight Rules

  • Each generator rule must define a weight.
  • The sum of all weights for a given generator must not exceed 1.0.
  • If the total is higher, the datapack will be considered invalid and ignored.

Example

{
  "source_block_id": "minecraft:dirt",
  "generation_rules": [
    {
      "generated_block_id": "minecraft:dirt",
      "weight": 0.5 // 50%
    },
    {
      "generated_block_id": "minecraft:sand",
      "weight": 0.5 // 50%
    }
  ]
}
{
  "source_block_id": "minecraft:dirt",
  "generation_rules": [
    {
      "generated_block_id": "minecraft:dirt",
      "weight": 0.5 // 50%
    },
    {
      "generated_block_id": "minecraft:sand",
      "weight": 0.25 // 25%
    },
    {
      "generated_block_id": "minecraft:stone",
      "weight": 0.25 // 25%
    }
  ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published