Skip to main content

Editing recipes with KubeJS Mekanism

Mod version shipped with FlammiCraft: 2101.4.0

Deutsch

This addon integrates Mekanism recipe scripting and the former Extends types. The corresponding machine addon must be installed; the standalone Extends JAR is unnecessary.

Put recipe changes in ServerEvents.recipes within kubejs/server_scripts. For example, event.recipes.mekmm.recycler('minecraft:iron_nugget', 'minecraft:iron_ingot', 0.5) creates a 50% nugget-output recycler recipe. Assign your own stable recipe ID. Reload appropriately, inspect script errors and the viewer, then test actual machine inputs/outputs.

Namespaces include evolvedmekanism (melting, alloying, apt, chemixing, solidifying), mekmm (lathe, rolling_mill, recycler, planting, stamper) and mekanismsun (transmutation, alloying, assemble). Methods require their owning addon. Planting perTickUsage(true) changes chemical consumption to per tick; calculate quantity with duration.

Use MekanismChemical.match('mekanism:hydrogen') or a #tag for chemical replacement, rather than an item ingredient. In event.replaceInput specify the actual recipe type and replacement chemical. Without a replacement amount the original quantity remains; '25x mekanism:oxygen' supplies a new amount. Exact matching compares the complete ingredient expression, not amounts.

For missing methods inspect addon and namespace. For absent matches check chemical type, recipe type and tag membership. Registrations require a full restart rather than only recipe reload. Source/API checks do not replace testing an actual running machine.