Community listing page, reviews here may not be monitored by the author.
Kubejs IU
No reviews yet
KubeJS bridge for Industrial Upgrade machine recipes: inspect, add, remove and replace them from scripts. Includes in-game commands.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
KubeJS IU
Script the machine processing recipes of Industrial Upgrade (IU) from KubeJS.
The problem
IU has two completely separate recipe systems:
| Crafting recipes | Machine processing recipes | |
|---|---|---|
| Where | datapack data/industrialupgrade/recipe/*.json |
Java memory: com.denfop.api.recipe.RecipesCore.map_recipes |
| Example | crafting a machine block | crushing ore, making ME storage components |
| Recipe id | yes | no |
| Editable from KubeJS | yes (ServerEvents.recipes) |
not at all |
So pack authors run into dead ends like these:
event.remove({ id: 'industrialupgrade:...' })cannot delete a crusher recipe - it is not a datapack recipe.event.replaceInput(...)silently does nothing to IU's custom recipe types; KubeJS falls back to a no-op implementation for recipe types it has no schema for.- Machine recipes have no id at all, so there is nothing to target.
This mod exposes IU's internal recipe API as plain static methods that KubeJS (or any other mod) can call through Java.loadClass.
Quick start
// kubejs/startup_scripts/iu_machine.js -- must be startup_scripts
StartupEvents.postInit(event => {
const iu = Java.loadClass('com.kubejsiu.recipe.IURecipeBridge')
// Crusher: ender pearl -> ender dust
iu.addItemRecipe('macerator', 'minecraft:ender_pearl', 1, 'ae2:ender_dust', 1)
// Multi-slot machine with temperature: chip maker (5 slots)
iu.addMultiRecipe('microchip',
['ae2:cell_component_1k', 'ae2:certus_quartz_crystal',
'industrialupgrade:itemdust/silicon_dust', 'industrialupgrade:itemingots/osmium',
'industrialupgrade:itemingots/yttrium'],
[1, 1, 1, 1, 1],
'ae2:cell_component_4k', 1, 0, 4500)
})
Inspect recipes in game
/kubejs_iu machines list every machine name, slot count and recipe count
/kubejs_iu recipes macerator list all recipes of one machine
/kubejs_iu dump write the full machine list to the log
Machine names are matched literally and a typo is ignored silently, so always check the name first.
API
Add recipes
| Method | Notes |
|---|---|
addItemRecipe(machine, in, inCount, out, outCount) |
single item to item |
addItemRecipeTag(machine, tag, inCount, out, outCount) |
accepts tags like #c:plates/iron; one recipe per tag member |
addMachineRecipe(machine, in, inCount, out, outCount, energy) |
with energy cost |
addMultiRecipe(machine, ids[], counts[], out, outCount[, energy][, temperature]) |
multi-slot machines |
addFluidRecipe(machine, inFluid, inMb, outFluid, outMb) |
fluid machines |
addFluidItemRecipe(machine, fluid, mb, in, inCount, out, outCount) |
fluid + item to item |
addCentrifugeRecipe(in, inCount, out, outCount) |
thermal centrifuge |
addSeedBagRecipe(in, cropId) |
compressor seed bags |
Inspect
listMachines() - describeMachine(machine) - countRecipes(machine) - listRecipes(machine) - dumpMachines()
Remove and replace
| Method | Notes |
|---|---|
removeByInput(machine, in, inCount) |
removes recipes whose first input matches |
removeByOutput(machine, out, outCount) |
removes recipes producing that item |
clearMachine(machine) |
wipes the machine (items and fluids), returns how many were removed |
removeFluidRecipe(machine) |
wipes only that machine's fluid recipes |
replaceItemRecipe(machine, ...) - replaceFluidRecipe(machine, ...) |
clear, then register |
reloadRecipes(className) |
re-runs the default recipes of a registration class (take the class name, not the machine name) |
Every method returns false / 0 and logs a warning on failure instead of throwing into KubeJS.
Rules and caveats
- Call the API inside
StartupEvents.postInitinkubejs/startup_scripts/. IU's recipe table already exists at that point, andaddRecipeappends - putting this inserver_scriptswould duplicate recipes on every/reload. - Restart the game after changing those scripts;
/reloaddoes not re-run startup scripts. energy/temperaturevalues of0mean "use the machine default".
Requirements
- Minecraft 1.21.1, NeoForge 21.1.x
- Industrial Upgrade - required
- KubeJS - optional; the bridge references no KubeJS class, so other mods can call it as well
Notes
- 3 classes, 0 mixins, 0 blocks, 0 items, 0 packets. Server-side only installation works.
- Contains no code, assets or data from Industrial Upgrade; IU is a compile-time dependency only.
- License: MIT.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources