Skip to content

Recipes

hp-1e edited this page Oct 31, 2026 · 1 revision

English | 中文

Recipes

This mod registers a KubeJS recipe type for every one of the 66 Tinkers' Construct recipe serializers. Write them in ServerEvents.recipes as event.recipes.tconstruct.<type>. KubeJS's own event.remove, event.replaceInput and event.replaceOutput work on Tinkers recipes too.

Style rules

  • The constructor takes at most one argument: the thing that best represents the recipe. Melting takes the input, casting takes the result, modifier recipes take the modifier ID, and alloys take nothing.
  • "ID + amount" is always two arguments, e.g. .fluid('tconstruct:molten_gold', 90).
  • Lists are built by calling a singular method once per entry, e.g. .input(...), .byproduct(...).
  • Every other field uses a chained method named after its JSON key, e.g. .cooling_time(50), .cast_consumed(true).
  • A missing required field raises an English error at load time that names the method to call.

Melting

ServerEvents.recipes(event => {
  // Plain melting; temperature and time are optional and computed from the result
  event.recipes.tconstruct.melting('#forge:ingots/gold')
    .result('tconstruct:molten_gold', 90)
    .temperature(700)
    .time(60)
    .byproduct('tconstruct:molten_copper', 10)

  // Ore melting; the 3rd argument is the ore rate: metal, gem, ...
  event.recipes.tconstruct.ore_melting('#forge:ores/gold')
    .result('tconstruct:molten_gold', 180, 'metal')
    .byproduct('tconstruct:molten_copper', 90, 'metal')

  // Damageable melting; the 3rd argument is the unit durability
  event.recipes.tconstruct.damagable_melting('minecraft:golden_sword')
    .result('tconstruct:molten_gold', 180, 90)
})

Casting

event.recipes.tconstruct.casting_table('minecraft:gold_ingot')
  .fluid('tconstruct:molten_gold', 90)
  .cast('#tconstruct:casts/multi_use/ingot')
  .cast_consumed(false)
  .cooling_time(50)
Recipe Constructor Required chained methods Common optional methods
casting_table / casting_basin / retextured_casting_* Result .fluid() .cast() .cast_consumed() .switch_slots() .cooling_time()
table_duplication / basin_duplication Cast .fluid() .cooling_time()
casting_*_potion Result .bottle() .fluid() .cooling_time()
casting_*_tipping / casting_*_tipped_clearing Modifier ID .tools() .fluid() .cooling_time()
table_filling / basin_filling Container .fluid_amount()
*_casting_material / *_casting_composite / *_tool_casting Result .item_cost() .cast() .allowed_materials() etc.
*_casting_part_swapping Tool .item_cost() .index() .allowed_materials()
material_fluid Output material .fluid() .input() .temperature()
molding_table / molding_basin Result .material() .pattern() .pattern_consumed()

Alloying

event.recipes.tconstruct.alloy()
  .input('tconstruct:molten_copper', 270)
  .input('tconstruct:molten_tin', 90)
  .catalyst('tconstruct:molten_quartz', 10)   // must be present, not consumed
  .result('tconstruct:molten_bronze', 360)
  .temperature(700)                           // optional, computed from the result

Modifier recipes

event.recipes.tconstruct.modifier('tconstruct:diamond')
  .tools('#tconstruct:modifiable')
  .input('minecraft:diamond', 4)              // or .input('4x minecraft:diamond')
  .input('minecraft:nether_star')
  .slots('upgrades', 1)
  .level(1, 3)                                // level range; .level(3) means exactly level 3
  .max_tool_size(1)

event.recipes.tconstruct.incremental_modifier('tconstruct:sharpness')
  .tools('#tconstruct:modifiable/melee')
  .input('minecraft:quartz')                  // incremental modifiers take one input, no count
  .needed_per_level(36)
  .amount_per_item(1)
  .slots('upgrades', 1)

event.recipes.tconstruct.swappable_modifier('tconstruct:embellishment')
  .variant('tconstruct:iron')
  .tools('#tconstruct:modifiable')
  .input('minecraft:iron_ingot', 4)

event.recipes.tconstruct.multilevel_modifier('tconstruct:luck')
  .tools('#tconstruct:modifiable')
  .input('minecraft:lapis_block')
  .level(1, 'upgrades', 1)                    // one call per level, optionally with a slot cost
  .level(2)
  .level(3, 'abilities', 1)

multilevel_incremental_modifier is written like incremental_modifier plus .level(...) calls.

Other recipes (positional arguments)

These recipes use the default KubeJS style: pass the required fields to the constructor in order, then set optional fields with chained methods of the same name.

Recipe Constructor arguments (in order) Optional fields
material_melting material, fluid result temperature
melting_fuel temperature, rate fluid duration
entity_melting entity, fluid result damage
material item, material value needed leftover
part_builder pattern, cost, result pattern_item allow_uncraftable
item_part_builder pattern, result material pattern_item cost
tool_building tool result_count slot_layout extra_requirements parts_override extra_materials
part_builder_recycling tool, pattern, results (pattern ID → item)
part_builder_tool_recycling pattern tools parts
overslime_modifier / crafting_overslime_modifier item, restore amount tools
modifier_salvage tools, modifier, slots max_tool_size level
modifier_repair / crafting_modifier_repair modifier, item, repair amount
remove_modifier / extract_modifier inputs name tools leftovers modifier_predicate
modifier_sorting inputs (exactly 1)
modifier_set_worktable data key, inputs, add to set tools modifier_predicate allow_traits
enchantment_converting group name, inputs, match book, return unenchanted modifier_predicate
toggle_interaction inputs tools
tinker_station_damaging item, damage amount
tinker_station_part_swapping / tool_material_swapping tools max_stack_size extra_requirements
fixed_material_swapping tools, item, material, part index max_stack_size repair_value extra_requirements
part_swapping_override tools, part, part index max_stack_size extra_requirements
tipped_tool_transform result, input, modifier slot_layout materials
severing entity, drop per_level_chance looting_bonus
ageable_severing entity, adult drop child_result per_level_chance looting_bonus
player_beheading / snow_golem_beheading / mooshroom_demushrooming / sheep_shearing none per_level_chance looting_bonus
// Diamond → mythril material
event.recipes.tconstruct.material('minecraft:diamond', 'kubejs:mythril')
// Creepers drop their heads, 10% chance per severing level
event.recipes.tconstruct.severing('minecraft:creeper', 'minecraft:creeper_head').per_level_chance(0.1)

Field formats follow Tinkers' Construct datapack recipes. docs/tconstruct-recipe-reference.md in the source repository lists every field.

Batch metal recipes

ServerEvents.recipes(event => {
  ArsenalRecipes.metal(event, {
    name: 'mythril',                      // matches forge:ingots/mythril and similar tags
    fluid: 'kubejs:molten_mythril',       // fluid ID or '#fluid_tag'
    temperature: 900,                     // optional, derived from the fluid
    byproducts: [{ fluid: 'tconstruct:molten_silver', amount: 30 }],
    ores: true                            // false skips ore and raw ore recipes
  })
})

This generates melting and casting recipes for blocks, ingots and nuggets based on forge: tags, plus melting recipes for raw ore, raw ore blocks and sparse, normal and dense ores.

Fluid amount constants

ArsenalFluids exposes the standard Tinkers amounts, such as ArsenalFluids.INGOT (90), NUGGET, METAL_BLOCK, GEM, GEM_SHARD, BRICK, GLASS_BLOCK, SLIMEBALL and BOTTLE.

Clone this wiki locally