Skip to content
Michael Weatherby edited this page Sep 26, 2024 · 81 revisions

Mechanization exposes various tools, machines, recipes, and other information via function tags, nbt storage, and scoreboard data. These enable hooking into most events triggered by Mech. If something doesn't exist that you need, contact me.

Important References:

Mechanization depends on a variety of libraries to accomplish core gameplay. This enables you to add cross-compat for certain gameplay systems with Mech without needing the datapack as a dependency. For example, all energy networks are handled by DatapackEnergy, so you can make a compatible energy-based datapack using just that library.

Recipes

Alloy Furnace

Extend the function tag #mechanization:registry_populate. Copy & modify the following sample code. Note the recipe is not validated, so make sure the recipe input is valid.

data modify storage mechanization:registry recipes.alloy_furnace append value { \
  input:[ \
    {type:"fluid", id:"molten_iron", amount:0}, \      # requires an amount of fluid in 1 of the 2 tanks
    {type:"item",id:"minecraft:flint", count:0}, \     # requires an amount of an item by ID in 1 of the 3 item slots
    {type:"dict",id:"ingot.tin", count:0} \            # requires an amount of an item by ore dict in 1 of the 3 item slots
  ],  \                                                ## ore dict follows NBT reference 'components."minecraft:custom_data'.smithed.dict.<entry>'
  output:{type:"fluid",id:"molten_steel", amount:0}, \ # fluid output; while type is here for consistency, the Alloy Furnace only outputs fluid
  machine_upgrade:0b, \                                # 1b to require a Machine Upgrade for the recipe
  bonus_mode:0b \                                      # 10% chance to double output; 1b for Ender Upgrade, 2b for Nether Upgrade
}
Clone this wiki locally