Skip to content
 
 

Repository files navigation

Craftorio Ores

Data-driven ore mod for Minecraft. Define your ores in config/Craftorio/ores/oreDefinitions.json and the mod registers blocks, items, world generation, tools, armor, recipes and mod integrations automatically.

Branch status

Branch Minecraft Forge Status
craftorio 1.12.2 14.23.5.2838 stable, v0.6.0
1.20.1 1.20.1 47.x in progress — V1 port (see docs/porting/)

This branch (1.20.1) is the port effort. The 1.12 codebase serves as the behavioral reference; almost no code is reused verbatim because of API churn between 1.12 and 1.20.1.

What this mod gives you on 1.20.1 (V1 goals)

  • JSON-defined ores. One config file describes every ore: name, color, hardness, harvest level, generation per dimension, drops, recipes, integrations.
  • Vanilla parity drops. Metal ores drop a raw_* item (like vanilla 1.17+), gem ores drop their configured item directly. Items carry #forge:ingots/<name>, #forge:ores/<name>, #forge:raw_materials/<name> tags so other mods see them as first-class equivalents.
  • Overlay textures. One PNG per ore. The base block (stone, deepslate, netherrack, end stone, modded targets) is supplied at render time via Forge forge:composite model loader — no per-base PNG duplication, and resourcepacks editing the base block automatically affect ore visuals.
  • Per-dimension generation. Ores spawn with different parameters per ResourceLocation-keyed dimension. Stone + deepslate handled via tag-based Bases[] targets that mirror vanilla 1.18+ practice.
  • Full vanilla replacement. Optionally disable vanilla iron/copper/coal/diamond/etc generation and replace already-placed vanilla ore blocks with your ore on chunk load. Combined with retrogen, gives a fully consistent experience on existing worlds.
  • Retrogen. Add an ore to your config or bump RetrogenVersion; existing chunks gain the new ore on next load, deterministically, throttled.
  • Mod integrations. IC2: Refactored, Immersive Engineering, Tinkers' Construct 3.x, Thermal Series, JustEnoughResources. All opt-in via ModList.isLoaded(...); no hard dependencies.

V1 explicitly does NOT ship the v0.6.0 ore-variant system (genVariants — poor/low/moderate/high/rich). The genVariants field is accepted in user configs but ignored with a warning. See docs/porting/00-overview.md for scoping.

Configuration (v2 schema)

Full field reference: docs/porting/02-json-schema-v2.md. Legacy v1 configs are migrated in-place on load (docs/porting/08-config-migration.md).

  1. Run once to generate config/Craftorio/ores/oreDefinitions.json (empty template if missing).
  2. Edit the JSON, restart (or /reload for datapack-driven changes such as worldgen and IC2 recipes).

Worked example — metal ore with vanilla replacement + retrogen

This entry disables vanilla iron generation, generates mod iron in stone and deepslate, retro-replaces existing vanilla iron on chunk load, and retrogen-fills already-visited chunks when RetrogenVersion is bumped:

{
  "OreList": [
    {
      "Name": "Iron",
      "Color": "0xF3D1BB",
      "Hardness": 3.0,
      "Harvestlevel": 1,
      "GenIngot": true,
      "GenFullBlock": true,
      "Drops": {
        "Item": "minecraft:raw_iron",
        "Min": 1,
        "Max": 1,
        "Fortune": "uniform_bonus_count(1)"
      },
      "Smelting": {
        "Output": "minecraft:iron_ingot",
        "XP": 0.7,
        "Time": 200
      },
      "Render": {
        "Overlay": "ores:block/overlay/iron",
        "Mode": "fixed"
      },
      "Generation": {
        "Dimensions": [
          {
            "ID": "minecraft:overworld",
            "Bases": [
              { "Block": "#minecraft:stone_ore_replaceables",     "MinY":   1, "MaxY": 64, "VeinSize": 8, "Tries": 20 },
              { "Block": "#minecraft:deepslate_ore_replaceables", "MinY": -64, "MaxY": 16, "VeinSize": 8, "Tries": 12 }
            ]
          },
          {
            "ID": "minecraft:the_nether",
            "Bases": [
              { "Block": "minecraft:netherrack", "MinY": 10, "MaxY": 117, "VeinSize": 8, "Tries": 10 }
            ]
          },
          {
            "ID": "twilightforest:twilight_forest",
            "BaseLike": "overworld",
            "MinY": 0,
            "MaxY": 80,
            "VeinSize": 8,
            "Tries": 20
          }
        ]
      },
      "DisableVanilla": "iron",
      "ReplacesVanilla": ["#minecraft:iron_ores"],
      "RetrogenVersion": 1
    }
  ],
  "GemList": []
}

Key fields:

Field Purpose
DisableVanilla String alias (iron, coal, …) or explicit PlacedFeature list — removes vanilla ore generation
ReplacesVanilla Block/tag list swapped to mod ore on chunk load
RetrogenVersion Bump to re-run retrogen on already-loaded chunks
BaseLike Shorthand for modded dimensions (overworld / nether / end / deepslate); explicit Bases[] wins
Render.Mode fixed (full-color overlay PNG) or tinted (grayscale + Color tint)

Worked example — gem ore

{
  "GemList": [
    {
      "Name": "Ruby",
      "Color": "0xFF0000",
      "Hardness": 2.2,
      "Harvestlevel": 4,
      "Drops": {
        "Item": "ores:ruby",
        "Type": "gem",
        "Min": 1,
        "Max": 1,
        "Fortune": "ore_drops"
      },
      "Render": { "Overlay": "ores:block/overlay/ruby", "Mode": "tinted" },
      "Generation": {
        "Dimensions": [{
          "ID": "minecraft:overworld",
          "Bases": [
            { "Block": "#minecraft:stone_ore_replaceables", "MinY": -16, "MaxY": 32, "VeinSize": 4, "Tries": 2 }
          ]
        }]
      }
    }
  ],
  "OreList": []
}

Use /craftorio probe-dim [<dimension>] [--suggest-json] (op) to inspect modded dimension base blocks when BaseLike is not enough.

Quick start (once V1 is published)

  1. Drop the jar in mods/.
  2. Copy or edit config/Craftorio/ores/oreDefinitions.json using the examples above.
  3. Restart the server/client.

Porting documentation

Living design docs for the 1.12 → 1.20.1 effort live under docs/porting/:

Building

./gradlew build
./gradlew runClient
./gradlew runServer
./gradlew runData

Requires Java 17. Toolchain is auto-provisioned by Gradle.

License

Inherits from the upstream Craftorio Ores project. See repository root for the original license notice from the craftorio branch.

About

Data-driven ore mod for Minecraft.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages