Oritech · Addon guide · Advanced

KubeJS Oritech Guide: Creating Custom Machine Recipes

This guide teaches modpack developers and advanced players how to create, modify, and remove custom recipes for Oritech machines using KubeJS. By mastering these scripts, you can seamlessly integrate Oritech's Foundry, Assembler, and Particle Accelerator into custom progression trees and unify cross-mod ore processing chains.

What you need

  • Minecraft with Oritech, KubeJS, and the KubeJS Oritech addon installed (or native datapack support)
  • EMI, JEI, or REI installed for inspecting item IDs, tags, and recipe registries
  • The Oracle Index mod (recommended for checking default Oritech machine baselines)
  • A plain text editor or code editor (such as VS Code with the ProbeJS extension)
  • Operator permissions in a test world to run reload and debug commands

Step by step

  1. 1Set Up the Server Script Environment

    Launch your Minecraft instance once to generate the KubeJS folder structure, then navigate to your instance directory and open the 'kubejs/server_scripts' folder. Create a new file named 'oritech_custom_recipes.js' and open it in your code editor. Inside the file, initialize the main recipe event listener by writing 'ServerEvents.recipes(event => { });'—all of your custom Oritech machine modifications will go inside these curly braces.

    Tip: Install ProbeJS alongside KubeJS to get automatic code completion for Oritech's exact recipe schemas inside VS Code.

  2. 2Extract Exact Item IDs and Recipe Types

    Load into a creative test world and open EMI or JEI. Press F3 + H on your keyboard to enable Advanced Tooltips, which reveals the namespace IDs of items and recipes when you hover over them. Look up an existing Oritech Foundry or Assembler recipe, hover over the recipe category icon or output, and note down the exact recipe ID format and item tags used by the mod.

    Tip: You can hold an item in your main hand and run '/kubejs hand' in chat to copy its exact ID and tag list directly to your clipboard.

  3. 3Remove Conflicting Default Recipes

    Before adding an altered recipe, you should remove the default one so the machine does not experience recipe conflicts. Inside your 'ServerEvents.recipes' block, use 'event.remove({ id: "oritech:recipe_path_here" })' using the exact recipe ID you found via EMI or JEI. This cleanly strips the original processing path without breaking other recipes that produce the same item.

    Tip: Avoid removing recipes solely by output item unless you want to wipe out every single alternative path Oritech provides for that resource.

  4. 4Script a Custom Foundry Alloy Recipe

    The Foundry acts as Oritech's primary alloying multiblock, combining multiple solid inputs into specialized ingots or materials. If using the KubeJS Oritech binding, call 'event.recipes.oritech.foundry()' (or use 'event.custom()' with the 'oritech:foundry' type) and define your input array, output item array, and processing time in ticks. Use unified tags like '#c:ingots/copper' instead of strict item IDs for the inputs so your recipe accepts metals from any compatible mod.

    Tip: Keep processing times balanced with default Oritech alloys so that machine speed addon blocks scale predictably.

  5. 5Create a Multi-Component Assembler Recipe

    The Assembler crafts complex technological components, electric tools, and cybernetic parts from multiple distinct items. Define a new recipe targeting the 'oritech:assembler' recipe type and provide up to four distinct ingredient inputs alongside your desired output item and crafting duration. Ensure that no two Assembler recipes share the exact same subset of inputs, as this can cause the multiblock to craft the wrong component when automated via pipes.

    Tip: Check the Oracle Index or EMI to see the baseline processing ticks for tiered machine cores before setting your custom Assembler durations.

  6. 6Configure a High-Energy Particle Accelerator Recipe

    Unlike standard processing machines, the Particle Accelerator operates on collision kinetics rather than simple crafting ticks. When scripting a recipe for the 'oritech:particle_accelerator' type, you must specify the two colliding input items, the resulting output item, and the required collision velocity or energy threshold. Set this threshold carefully: higher velocity requirements force the player to build a much larger physical accelerator ring in the world to achieve the necessary particle speed.

    Tip: Test extreme velocity values in a creative world first to ensure the required ring size fits reasonably within loaded chunks.

  7. 7Reload Scripts and Verify in EMI/JEI

    Save your JavaScript file and return to your running Minecraft test world. Run the '/reload' command in chat to compile your KubeJS server scripts on the fly. Open EMI or JEI, search for your newly scripted output items, and verify that the Foundry, Assembler, and Particle Accelerator tabs display the proper inputs, outputs, and energy or velocity statistics.

    Tip: If your recipe does not appear, check 'logs/kubejs/server.log' in your instance folder for syntax errors or invalid item tags.

  8. 8Perform an In-World Multiblock Test

    Place down the Foundry, Assembler, and Particle Accelerator blocks in your test world and assemble their complete multiblock structures, including Machine Cores and Energy Acceptors where required. Connect creative energy sources and insert your scripted recipe ingredients using Oritech item pipes. Confirm that the animated machines engage, consume the expected power, respect addon block upgrades, and eject the finished custom product.

How it works

Oritech registers all of its machine processing chains through Minecraft's native datapack recipe system. During server startup or a datapack reload, KubeJS intercepts this registry phase and injects dynamic virtual JSON payloads into the game memory. Whether you use the dedicated KubeJS Oritech wrapper methods or raw 'event.custom()' JSON definitions, the underlying logic translates your JavaScript arrays into the exact data structures Oritech's machines expect.

Because Oritech machines are designed around upgradeable multiblocks, recipes typically define a base duration in ticks rather than a hard-coded energy cost per tick. The machine itself calculates total energy consumption and processing speed dynamically by multiplying the recipe's base duration against the installed Machine Core tier and attached addon blocks (such as speed or efficiency extenders). For the Particle Accelerator, the recipe dictates a target collision requirement, which the multiblock checks against the actual physical velocity of the particles traveling through the player's constructed ring.

Common mistakes

  • Hardcoding mod-specific item IDs instead of common tags (like '#c:ingots/steel'), which prevents materials from compatible mods like Mekanism or Tech Reborn from working in your custom Foundry recipes.
  • Placing the script inside 'client_scripts' or 'startup_scripts' instead of 'server_scripts', which causes the 'ServerEvents.recipes' listener to never fire.
  • Creating overlapping input requirements in the Foundry or Assembler, leading to recipe race conditions when players pump multiple ingredients into the machine via automated pipes.
  • Setting Particle Accelerator collision thresholds arbitrarily high without testing the physical ring geometry required to reach that speed.

FAQ

Why does my custom recipe work with 'event.custom()' but not with 'event.recipes.oritech'?

The shorthand 'event.recipes.oritech' syntax requires the KubeJS Oritech integration addon to be installed. However, 'event.custom()' interacts directly with Minecraft's native datapack recipe system and works with only base Oritech and KubeJS installed.

How do I find the exact JSON structure for other Oritech machines like the Centrifuge or Atomic Forge?

Look up an existing recipe for that machine in EMI with Advanced Tooltips (F3 + H) enabled to get its recipe ID, or unpack the Oritech mod '.jar' file and browse the 'data/oritech/recipe/' directory to view the author's original JSON files.

Do custom KubeJS recipes automatically adapt to Oritech's machine addon blocks?

Yes. Because addon ports and extenders apply multipliers directly to the machine entity's processing speed and power draw, any custom recipe with a valid base duration will scale automatically.

Why does EMI not show my updated recipe immediately after saving the script?

KubeJS server scripts only recompile when a datapack reload is triggered. You must run '/reload' in-game and wait for EMI to finish baking its recipe index.

By leveraging KubeJS server scripts to manipulate Oritech's recipe registries, you can seamlessly customize Foundry alloys, Assembler components, and Particle Accelerator collisions to fit any modpack progression.

More Oritech guides

Oritech · Getting startedOritech Getting Started Guide: First Machines & ProgressionStarting out in Oritech requires shifting from simple single-block crafting to building animated multiblock machines and physical upgrade networks. In this guide, you will learn how to gather essential early-game resources, assemble your first Machine Cores, set up a reliable power grid, and establish a basic ore-processing factory. Mastering these fundamentals will lay the groundwork for advanced automation, laser mining, and cybernetic enhancements.Beginner7 steps
Oritech · ExplainedMachine Addons, Ports & Extenders ExplainedUnlike traditional tech mods where upgrades are tiny items tucked away inside a GUI inventory, Oritech uses a physical, visual multiblock system for machine customization. In this guide, you will learn how to assemble Oritech multiblocks, expand their connectivity using Machine Extenders, and attach physical Addon blocks to boost processing speed, efficiency, and capacity. Mastering this system is essential for scaling your factory from basic ore processing to advanced late-game automation.Beginner7 steps
Oritech · Setup guideHow to Build an Automated Ore Processing LineBuilding an automated ore processing line in Oritech transforms your raw mined materials into significantly higher ingot yields while generating valuable metal byproducts. By chaining together specialized multiblock machines like the Pulverizer, Crusher, Foundry, and Powered Furnace, you can automate your resource production from raw ore to finished ingots and alloys.Intermediate7 steps
Oritech · PowerOritech Power Generation Guide: From Biofuel to Oil & SolarMastering energy generation in Oritech is essential as you transition from basic ore processing to running heavy automated multiblocks, mining lasers, and particle accelerators. This guide walks you through comparing the mod's main power sources, building a self-sustaining biofuel loop, tapping remote oil wells, and scaling up your grid with Big Solar Panels. By establishing a diverse energy infrastructure, you will ensure your factory never stalls during high-demand operations.Intermediate7 steps
Oritech · ProgressionHow to Make Plastic in Oritech: Oil Refining vs. Bio-FarmingPlastic Plates are a crucial mid-game milestone in Oritech, unlocking advanced circuit boards, Machine Cores, and cybernetic upgrades. This guide compares and walks you through both plastic production pathways—pumping naturally spawning Oil Wells versus building automated Bio-Farms—so you can set up the best supply chain for your base.Intermediate7 steps
Oritech · AutomationLogistics & Automation: Pipes, Wrench Config, and Drones ExplainedMastering Oritech's logistics is essential for transitioning from simple manual processing to a fully automated, lag-free factory. In this guide, you will learn how to build and configure the mod's single-tier cached pipe networks for items, fluids, and energy, as well as how to deploy Drone transport systems to haul resources from remote outposts back to your main hub.Intermediate7 steps