KubeJS Industrial Foregoing NeoForge
A KubeJS addon that lets you write recipes for Industrial Foregoing and create your own machine addons.
Requeriments
- KubeJS
- Industrial Foregoing
- Minecraft 1.21.1
- NeoForge 21.1.240
Recipes
Drop this in kubejs/server_scripts/:
ServerEvents.recipes(event => {
// Crusher (the pickaxe action in the Stonework Factory)
event.recipes.industrialforegoing.crusher(
'minecraft:gravel', // output <- note: output comes first
'minecraft:cobblestone' // input
)
// Dissolution Chamber
event.recipes.industrialforegoing.dissolution_chamber(
['minecraft:dirt', 'minecraft:sand'], // input items, may be empty
Fluid.of('minecraft:water', 500), // input fluid
Item.of('minecraft:diamond', 2), // output item
200 // time in ticks
).outputFluid(Fluid.of('minecraft:lava', 100)) // optional
// Fluid Extractor
event.recipes.industrialforegoing.fluid_extractor(
'minecraft:oak_log', // block being tapped
'minecraft:stripped_oak_log', // block left behind
0.05, // break chance, 0.0 - 1.0
Fluid.of('industrialforegoing:latex', 8)
)
// Stonework Factory - generate
event.recipes.industrialforegoing.stonework_generate(
'minecraft:obsidian',
1000, 1000, // water / lava needed
0, 1000 // water / lava consumed
)
// Laser Drill - ore
event.recipes.industrialforegoing.laser_drill_ore(
{ item: 'minecraft:diamond', count: 1 }, // output
'industrialforegoing:red_laser_lens', // catalyst lens
[{
biome_filter: { whitelist: [], blacklist: [] },
dimension_filter: { whitelist: [], blacklist: ['minecraft:the_end'] },
depth_min: 0,
depth_max: 255,
weight: 5 // higher = more common
}]
)
// Laser Drill - fluid
event.recipes.industrialforegoing.laser_drill_fluid(
Fluid.of('industrialforegoing:ether_gas', 10), // output
'industrialforegoing:purple_laser_lens', // catalyst lens
[{
biome_filter: { whitelist: [], blacklist: [] },
dimension_filter: { whitelist: [], blacklist: [] },
depth_min: -64,
depth_max: 256,
weight: 8
}],
{ entity: { type: 'minecraft:wither' }, data: {}, display: '' } // optional
)
})
Rarity is a list, so one ore can have different weights at different depths. All five fields are mandatory — Industrial Foregoing's codec has no defaults.
Removing works on the same keys the mod uses:
event.remove({ type: 'industrialforegoing:laser_drill_ore', output: 'minecraft:diamond' })
Machine addons
Register brand new efficiency, speed, processing and range addons. This one is a startup item type, so it goes in kubejs/startup_scripts/:
StartupEvents.registry('item', event => {
event.create('netherite_speed_addon', 'industrialforegoing:addon')
.speedTier(4) // matches IF's tier formulas
.displayName('Netherite Speed Addon')
event.create('hybrid_addon', 'industrialforegoing:addon')
.speed(3) // or set raw augment values
.efficiency(0.5) // lower is better
.processing(2)
.rarity('epic')
})
| Raw value | Tier preset | Augment |
|---|---|---|
speed(v) |
speedTier(n) → 1 + n |
Speed |
efficiency(v) |
efficiencyTier(n) → 1 - n * 0.1 |
Efficiency |
processing(v) |
processingTier(n) → 1 + n |
Processing |
range(v) |
rangeTier(n) → n |
Range |
augment(type, v) |
— | anything, including other mods' types |
The result behaves exactly like a built-in addon:
- Tooltips are generated from Industrial Foregoing's own translation keys, so they match the vanilla addons and follow the game language
- Right-click a machine to slot the addon straight in
- Textured by default with Industrial Foregoing's addon texture — no resource pack needed until you call
.texture(...) - Stacks to 16, and every other KubeJS item builder method (
displayName,maxStackSize,rarity,tooltip,glow, …) still works
Give it a recipe like any other item:
ServerEvents.recipes(event => {
event.recipes.industrialforegoing.dissolution_chamber(
['minecraft:redstone', 'minecraft:glass_pane', '#c:gears/diamond', 'minecraft:sugar'],
Fluid.of('industrialforegoing:latex', 1000),
'kubejs:netherite_speed_addon',
200
)
})
Credits
Huge thanks to:
- LatvianModder — for creating KubeJS, the scripting mod this whole addon is built on
- Buuz135 — for creating Industrial Foregoing, the mod these recipes and addons plug into
This addon is only glue between their two projects. Go support them.
Full documentation, argument tables and the remaining details are in WIKI in the repository.

