Modding

Pack makers & modders

Ex Nihilo Reborn is built to have packs made on top of it. Almost everything is data: change it with a data pack, no code needed. For new blocks and items there is a Java API.

Data packs#

Every sieve, hammer, crook, crucible and barrel recipe is a JSON file under data/exnihiloreborn/recipe/. To change one, ship a data pack with a file at the same path. To remove one, override it with a recipe that cannot load, or use Fabric's load conditions. To add one, put a new file anywhere under recipe/.

Fluid amounts are in droplets: 81000 = one bucket. Chances are per roll, from 0 to 1; a list of chances means several rolls.

Changed a recipe? /reload reloads data packs; /exnihilo reload reloads the config.

Recipe types#

Sieve: exnihiloreborn:sieve#

input is an item or tag. rolls maps each mesh to its list of chances; leave a mesh out (or give it 0) and it never finds the drop.

{
  "type": "exnihiloreborn:sieve",
  "input": "#exnihiloreborn:siftable/gravel",
  "result": {
    "count": 1,
    "id": "minecraft:angler_pottery_sherd"
  },
  "rolls": {
    "exnihiloreborn:diamond_mesh": [
      0.0008
    ],
    "exnihiloreborn:netherite_mesh": [
      0.0015
    ]
  }
}

Hammer: exnihiloreborn:hammer#

{
  "type": "exnihiloreborn:hammer",
  "block": {
    "id": "exnihiloreborn:compressed_cobblestone",
    "states": {}
  },
  "result": {
    "chances": [
      1
    ],
    "stack": {
      "count": 1,
      "id": "exnihiloreborn:compressed_gravel"
    }
  }
}

Hammers only crush blocks in #exnihiloreborn:hammerables.

Crook: exnihiloreborn:crook#

{
  "type": "exnihiloreborn:crook",
  "block": {
    "id": "minecraft:acacia_leaves",
    "states": {}
  },
  "result": {
    "chances": [
      0.25
    ],
    "stack": {
      "count": 1,
      "id": "minecraft:acacia_sapling"
    }
  }
}

Crucible: exnihiloreborn:crucible#

Set requiresFireproofCrucible for melts that need a porcelain crucible and heat.

{
  "type": "exnihiloreborn:crucible",
  "amount": 20250,
  "fluid": {
    "fluid": "minecraft:lava"
  },
  "input": "minecraft:cobblestone",
  "requiresFireproofCrucible": true
}

Crucible heat: exnihiloreborn:crucible_heat#

{
  "type": "exnihiloreborn:crucible_heat",
  "block": {
    "id": "#c:torches",
    "states": {}
  },
  "heat": 1
}

Barrel: exnihiloreborn:barrel#

A barrel recipe has a trigger, a list of conditions and a list of actions.

PartTypes used by the mod
Triggersinsert_item tick
Conditionsfluid_in fluid_above block_below
Actionsstore_item store_fluid fill_compost consume_fluid convert_block spawn_entity
{
  "type": "exnihiloreborn:barrel",
  "actions": [
    {
      "type": "store_item",
      "stack": {
        "count": 1,
        "id": "minecraft:obsidian"
      }
    }
  ],
  "conditions": [
    {
      "type": "fluid_in",
      "fluid": "minecraft:lava"
    },
    {
      "type": "fluid_above",
      "fluid": "minecraft:water"
    }
  ],
  "duration": 0,
  "icon": "minecraft:obsidian",
  "trigger": {
    "type": "tick",
    "chance": 1
  }
}
{
  "type": "exnihiloreborn:barrel",
  "actions": [
    {
      "type": "fill_compost",
      "increment": 0.05,
      "result": {
        "count": 1,
        "id": "minecraft:dirt"
      }
    }
  ],
  "conditions": [],
  "duration": 0,
  "icon": "minecraft:dirt",
  "trigger": {
    "type": "insert_item",
    "item": "#minecraft:leaves"
  }
}
{
  "type": "exnihiloreborn:barrel",
  "actions": [
    {
      "type": "consume_fluid",
      "amount": 40500,
      "fluid": "#exnihiloreborn:witchwater"
    },
    {
      "type": "convert_block",
      "filter": {
        "id": "minecraft:podzol",
        "states": {}
      },
      "result": {
        "id": "minecraft:mycelium",
        "properties": {
          "snowy": "false"
        }
      }
    }
  ],
  "conditions": [],
  "duration": 0,
  "icon": "minecraft:mycelium",
  "trigger": {
    "type": "tick",
    "chance": 0.1
  }
}

Milking: exnihiloreborn:milking#

{
  "type": "exnihiloreborn:milking",
  "amount": 810,
  "cooldown": 20,
  "entity": "minecraft:cow",
  "fluid": {
    "fluid": "exnihiloreborn:milk"
  }
}

Witch water: exnihiloreborn:witch_water_entity and witch_water_world#

{
  "type": "exnihiloreborn:witch_water_entity",
  "nbt": "",
  "result": "minecraft:cave_spider",
  "target": "minecraft:spider"
}
{
  "type": "exnihiloreborn:witch_water_world",
  "result": {
    "minecraft:andesite": 1,
    "minecraft:cobblestone": 3,
    "minecraft:diorite": 1,
    "minecraft:granite": 1
  },
  "target": "#exnihiloreborn:true_lava"
}

Ore pieces: exnihiloreborn:ore_piece#

Turns four pieces into whatever item is first in the result tag, so modded metals work without hard dependencies.

{
  "type": "exnihiloreborn:ore_piece",
  "piece": "exnihiloreborn:raw_tin_piece",
  "result": "#c:raw_materials/tin"
}

Tags#

Sieve and hammer inputs go by tags, so modded blocks can join in by adding themselves to a tag.

TagRegistryContains
#exnihiloreborn:barrelsitemOak Barrel, Birch Barrel, Spruce Barrel, Acacia Barrel, Dark Oak Barrel, Jungle Barrel, +7 more
#exnihiloreborn:compresseditemCompressed Cobblestone, Double Compressed Cobblestone, Triple Compressed Cobblestone, Quadruple Compressed Cobblestone, Quintuple Compressed Cobblestone, Sextuple Compressed Cobblestone, +44 more
#exnihiloreborn:crooksitemWooden Crook, Bone Crook
#exnihiloreborn:crook_repair/boneitemBone
#exnihiloreborn:cruciblesitemOak Crucible, Birch Crucible, Spruce Crucible, Acacia Crucible, Dark Oak Crucible, Jungle Crucible, +7 more
#exnihiloreborn:fruitsitem#exnihiloreborn:tree_fruit/apple, #exnihiloreborn:tree_fruit/cherry, #exnihiloreborn:tree_fruit/orange, #exnihiloreborn:tree_fruit/lemon, #exnihiloreborn:tree_fruit/peach, #exnihiloreborn:tree_fruit/pear, +4 more
#exnihiloreborn:hammersitemWooden Hammer, Netherite Hammer, Stone Hammer, Golden Hammer, Diamond Hammer, Iron Hammer, +1 more
#exnihiloreborn:sievesitemOak Sieve, Birch Sieve, Spruce Sieve, Acacia Sieve, Dark Oak Sieve, Jungle Sieve, +6 more
#exnihiloreborn:siftable/dirtitemDirt, #c:dirts
#exnihiloreborn:siftable/gravelitemGravel, #c:gravels
#exnihiloreborn:siftable/red_sanditemRed Sand, #c:sands/red
#exnihiloreborn:siftable/sanditemSand, #c:sands/colorless
#exnihiloreborn:tree_fruit/appleitem#c:fruits/apple, #c:fruits/apples, #c:apples, #c:foods/apple, Apple, Appleitem, +3 more
#exnihiloreborn:tree_fruit/bananaitem#c:fruits/banana, #c:fruits/bananas, #c:bananas, #c:foods/banana, Banana, Bananaitem, +3 more
#exnihiloreborn:tree_fruit/cherryitem#c:fruits/cherry, #c:fruits/cherries, #c:cherries, #c:foods/cherry, Cherry, Cherryitem, +3 more
#exnihiloreborn:tree_fruit/coconutitem#c:fruits/coconut, #c:fruits/coconuts, #c:coconuts, #c:foods/coconut, Coconut, Coconutitem, +3 more
#exnihiloreborn:tree_fruit/lemonitem#c:fruits/lemon, #c:fruits/lemons, #c:lemons, #c:foods/lemon, Lemon, Lemonitem, +3 more
#exnihiloreborn:tree_fruit/orangeitem#c:fruits/orange, #c:fruits/oranges, #c:oranges, #c:foods/orange, Orange, Orangeitem, +3 more
#exnihiloreborn:tree_fruit/peachitem#c:fruits/peach, #c:fruits/peaches, #c:peaches, #c:foods/peach, Peach, Peachitem, +3 more
#exnihiloreborn:tree_fruit/pearitem#c:fruits/pear, #c:fruits/pears, #c:pears, #c:foods/pear, Pear, Pearitem, +3 more
#exnihiloreborn:crookablesblock#minecraft:leaves, #exnihiloreborn:infested_leaves
#exnihiloreborn:hammerable/cobblestoneblockCobblestone, #c:cobblestones/normal
#exnihiloreborn:hammerable/gravelblockGravel, #c:gravels
#exnihiloreborn:hammerable/sandblockSand, #c:sands/colorless
#exnihiloreborn:hammerablesblock#c:glass_blocks, #c:concretes, #c:concrete_powders, #minecraft:wool, #minecraft:coral_plants, #minecraft:coral_blocks, +52 more
#exnihiloreborn:infested_leavesblockInfested Oak Leaves, Infested Birch Leaves, Infested Spruce Leaves, Infested Acacia Leaves, Infested Dark Oak Leaves, Infested Jungle Leaves, +5 more
#exnihiloreborn:hotfluid#c:lava, #techreborn:nitro_diesel
#exnihiloreborn:true_lavafluidLava, Flowing Lava
#exnihiloreborn:true_waterfluidWater, Flowing Water
#exnihiloreborn:water_likefluidFlowing Brine, Brine, Flowing Witchwater, Witch Water, Flowing Milk, Milk
#exnihiloreborn:witchwaterfluidFlowing Witchwater, Witch Water

Feature packs#

The big optional parts are built-in data packs that players switch per world on the Create World screen. Pack makers set what new worlds get in config/exnihiloreborn-extras.json under features:

ValueMeaning
onTicked by default, can be unticked.
offUnticked by default, can be ticked.
alwaysForced on.
neverNot offered at all.
Feature idPack
fruit_treesEight fruit trees found by sifting
machinesAuto sieve, auto hammer, cobblestone generator
rustlersLeaf bugs that jump out of broken leaves and steal from you
traderSky trades, animals with every visit, the trader's bell

Code that belongs to a feature checks for the marker tag exnihiloreborn:features/<id>, so your own data packs can tell whether a feature is on.

Config files#

All in the config/ folder. /exnihilo reload applies changes without a restart. With Mod Menu installed there is also a config screen.

exnihiloreborn.json#

SettingNameWhat it does
barrels.compostRateCompost RateThe amount of progress composting advances each barrel tick when a composting barrel is full.
barrels.milkingMilkingIf enabled, certain mobs standing on barrels will be milked periodically. Which mobs produce what can be controlled with recipes.
barrels.leakRadiusLeaking RadiusThe square radius around the barrel where the convert_block barrel action can convert blocks. This action is used in the base mod for leaking recipes.
barrels.tickRateTick RateControls the duration between barrel ticks. Measured in game ticks.
crucibles.stoneProcessingRateStone Processing RateControls how much solid is converted to fluid each time a fireproof crucible ticks. This is multiplied by the heat if the recipe requires a fireproof crucible.
crucibles.woodProcessingRateWood Processing RateControls how much solid is converted to fluid each time a wooden crucible ticks.
crucibles.stoneVolumeStone VolumeControls how many buckets of fluid a stone crucible can hold. Capacity is shared between solid and liquid contents.
crucibles.woodVolumeWood VolumeControls how many buckets of fluid a wooden crucible can hold. Capacity is shared between solid and liquid contents.
crucibles.tickRateTick RateControls the duration between crucible ticks. Measured in game ticks.
infested.infestedSpreadAttemptsInfested Spread AttemptsControls how many attempts already fully infested leaves make to infest others.
infested.infestingSpreadAttemptsInfesting Spread AttemptsControls how many attempts infesting leaves make to infest others.
infested.minimumSpreadProgressMinimum Spread ProgressControls how much progress infesting leaves have to have in order to infest others.
infested.progressPerUpdateProgress per UpdateControls how much progress is made each time leaves update
infested.spreadChanceSpread ChanceControls how likely leaves are to successfully spread.
infested.updateFrequencyUpdate FrequencyControls how many ticks there are between leaf updates.
seeds.enabledEnabledMaster toggle for seeds. If this is disabled all options below are too.
seeds.cactusCactus Seed
seeds.chorusChorus Pod
seeds.flowerSeedsTall Flower Seeds
seeds.grassGrass Seeds
seeds.kelpKelp Sporophyte
seeds.myceliumAncient Spores
seeds.netherSporesWarped & Crimson Spores
seeds.seaPickleSea Pickle Sprouts
seeds.sugarCaneSugar Cane Seeds
sieves.baseProgressBase ProgressControls how much the sieve is advanced each click by default. Haste and efficiency can modify this.
sieves.fortuneFortune EnabledIf enabled, meshes can be enchanted with Fortune, which sometimes rolls every drop more than once. Needs a restart.
sieves.efficiencyEfficiency EnabledIf enabled, sieves can be enchanted with efficiency to speed them up. Needs a restart.
sieves.efficiencyScaleFactorEfficiency FactorControls how much each efficiency level adds to the progress of each click.
sieves.hasteHaste EnabledIf enabled, players with the haste effect get a boost to sieving speed.
sieves.hasteScaleFactorHaste FactorControls how much each haste level adds to the progress of each click.
sieves.meshStackSizeMesh Stack SizeControls the max stack size of meshes. Needs a restart.
sieves.sieveRadiusSieve Connection RadiusControls the radius of the square in which adjacent sieves are advanced when one is activated.
strainers.minWaitTimeMin Wait TimeThe minimum time between items in the strainer. Measured in ticks.
strainers.maxWaitTimeMax Wait TimeThe maximum time between items in the strainer. Measured in ticks.
rustler.spawnChanceSpawn ChanceChance that breaking one leaf block by hand lets a Rustler out. 0% turns the Rustler off.
rustler.shearsNeverSpawnShears Are SafeIf enabled, breaking leaves with shears never lets a Rustler out.
rustler.stealChanceSteal ChanceChance that a Rustler's bite takes a stack from the player.
rustler.hotbarShareHotbar ShareHow often a steal goes for the hotbar instead of the rest of the inventory.
rustler.voidSearchRadiusVoid Search RadiusHow far, in blocks, a Rustler looks for an edge to jump from.
rustler.saplingDropChanceSapling Drop ChanceChance that a killed Rustler drops the sapling of the tree it came from.
extras.giveGuideBookGive Guide BookIf enabled, every new player gets the guide book on their first join.
extras.buildSkyIslandBuild Starting IslandIf enabled, a Sky Island world gets its starting island. Turn off for packs that bring their own.
extras.scarecrowRadiusScarecrow ReachBlocks around a scarecrow where no Rustler appears. 0 turns scarecrows off.
extras.starterKitStarter KitThe items new players start with are a list in exnihiloreborn-extras.json. Press the button to open the config folder.

exnihiloreborn-extras.json#

SettingDefaultWhat it does
giveGuideBooktrueNew players get the guide book on first join.
starterKit{}Items new players start with, as {"minecraft:bone_meal": 4}.
featuresall onWhat new worlds get for each feature pack (see above).
skyIslandByDefaulttrueSky Island is the default world type on Create World and for new servers.
buildSkyIslandtrueBuild the starting tree. Turn off for packs that bring their own island.
scarecrowRadius8Blocks around a scarecrow where no Rustler appears (0 to 16, 0 turns scarecrows off).

Your own island#

Packs with their own start: set buildSkyIsland to false and place your island with a structure, a datapack function or another mod. The Sky Island world type stays empty void with a plains biome. Set skyIslandByDefault to false if your pack uses a different world type.

Addon API#

For new woods, meshes, ore pieces, seeds and crushed blocks, write a Fabric mod with an exnihiloreborn:api entrypoint. The mod uses Mojang names (Fabric Loom without remapping on 26.x).

1. Depend on the mod#

Add the Ex Nihilo Reborn jar from CurseForge to your build, for example through CurseMaven, and declare the dependency:

// build.gradle
repositories { maven { url = "https://cursemaven.com" } }
dependencies {
    // replace PROJECT_ID and FILE_ID with the numbers from the CurseForge file page
    implementation "curse.maven:ex-nihilo-reborn-PROJECT_ID:FILE_ID"
}
// fabric.mod.json
"depends": { "exnihiloreborn": "*" },
"entrypoints": {
  "exnihiloreborn:api": [ "com.example.myaddon.MyExNihiloModule" ]
}

2. Register your content#

package com.example.myaddon;

import ohpancake.exnihiloreborn.api.ExNihiloApiModule;
import ohpancake.exnihiloreborn.api.ExNihiloRegistries;

public class MyExNihiloModule implements ExNihiloApiModule {
    @Override
    public void onInit(ExNihiloRegistries registries) {
        // a full wood set: sieve, strainer, barrel and crucible, registered as exnihiloreborn:<name>_sieve and so on
        registries.registerWood("redwood", false, registries.woodenBlockSettings());
        // a new ore piece, exnihiloreborn:raw_cobalt_piece
        registries.registerOrePiece("raw_cobalt", registries.defaultItemSettings());
    }
}

Blocks and items are registered with the game after every module has run; you provide the models, textures and recipes. If two addons register the same name, the second one gets the first one's block.

MethodRegisters
registerWood(name, fireproof, settings)Sieve, strainer, barrel and crucible for one wood
registerSieve / registerBarrel / registerCrucible / registerStrainer(name, fireproof, settings)One block, as exnihiloreborn:<name>_sieve and so on
registerMesh(name, color, enchantability, settings)A mesh, exnihiloreborn:<name>_mesh
registerOrePiece(name, settings)An ore piece, exnihiloreborn:<name>_piece
registerCrushedBlock(name, settings)A crushed block, exnihiloreborn:crushed_<name>
registerInfestedLeaves(name, source, settings)Infested leaves for a modded tree
registerSeed / registerTallPlantSeed / registerTransformingSeed(...)Seeds that plant blocks or transform one block into another
defaultItemSettings(), woodenBlockSettings(), stoneBlockSettings() ...Ready-made property presets

Override shouldLoad() to load your module only when another mod is present.

Events#

Server-side events in ohpancake.exnihiloreborn.api.ExNihiloEvents. Both fire after the world has changed.

ExNihiloEvents.SIFTED.register((level, pos, input, player) -> {
    // input: a copy of the block that was sifted; player: null for an auto sieve
});
ExNihiloEvents.LEAVES_INFESTED.register((level, pos, state) -> {
    // state: the new infested leaves
});

Translations#

The guide book, advancements and newer items are translated into Spanish, Portuguese, German, French, Russian and Chinese; everything else falls back to English. Resource packs can override any string through assets/exnihiloreborn/lang/<code>.json.

Using it in a modpack#

Ex Nihilo Reborn is MIT licensed: include it in any modpack, public or private. Questions or a pack to show off? Get in touch.