Powah! (Rearchitected) · Addon guide · Advanced
KubeJS Powah Guide: How to Add Custom Energizing Recipes, Coolants, and Heat Sources
This guide provides modpack developers with practical KubeJS scripts to customize Powah! (Rearchitected) mechanics, including the Energizing Orb, Thermo Generator, Magmator, and Reactor. Mastering these scripts allows you to deeply integrate Powah's energy generation and crafting tiers into your custom progression tree without relying on external datapack editors.
What you need
- Minecraft with Powah! (Rearchitected) and its dependencies (Cloth Config, GuideME)
- KubeJS installed for your specific modloader (Forge, Fabric, or NeoForge)
- A plain text editor or code editor (such as VS Code) to edit .js files
- JEI or REI installed to verify recipes and grab accurate item and fluid IDs
- In-game access to the Energizing Orb, Energizing Rods, Thermo Generator, and Magmator for testing
Step by step
1Set Up the KubeJS Server Scripts Directory
Launch your game once with both Powah! and KubeJS installed to generate the required folder structure. Navigate to your Minecraft instance directory, open the 'kubejs' folder, and then open 'server_scripts'. Create a new file named 'powah_custom.js' inside this folder, as all recipes and generator registries are handled on the server side.
Tip: Run the command '/kubejs hand' in-game while holding an item to quickly copy its exact registry ID to your clipboard.
2Create a Custom Energizing Orb Recipe
Open your 'powah_custom.js' file and set up a standard 'ServerEvents.recipes' listener. Inside the event block, use the 'event.custom()' method to define a recipe with the type 'powah:energizing'. You must pass an 'ingredients' array containing up to six item objects, an 'energy' integer specifying the total Forge Energy (FE) cost, and a 'result' object containing the output 'item' and 'count'.
Tip: For example, inside event.custom(), structure your JSON as: { type: 'powah:energizing', ingredients: [{ item: 'minecraft:diamond' }, { item: 'minecraft:redstone_block' }], energy: 50000, result: { item: 'powah:crystal_niotic', count: 1 } }.
3Remove or Modify Existing Energizing Recipes
If you are replacing a default progression item like Energized Steel or Blazing Crystal, you need to remove the original recipe first to prevent duplicates. Inside the same 'ServerEvents.recipes' block, call 'event.remove({ id: 'powah:energizing/energized_steel' })' or filter by output item and recipe type. Once removed, your custom recipe from the previous step will become the sole method of crafting.
Tip: Enable Advanced Tooltips in-game (F3 + H) and hover over recipes in JEI to see their exact recipe IDs for accurate removal.
4Register Custom Magmator Fuels
To register new fluids for the Magmator, open a 'PowahEvents.registerMagmatorFluids' event listener outside of your recipe event (or use the legacy 'onEvent("powah.magmator.fluid", ...)' syntax if on older KubeJS versions). Call 'event.add("modid:fluid_id", heatValue)' where the fluid ID is your target liquid and the heat value determines how much energy is produced per bucket. Check the in-game Manual or JEI to see how vanilla Lava is scored so you can balance your custom fluid appropriately.
Tip: You must reference the source fluid ID, not the flowing fluid ID or the bucket item ID.
5Register Custom Liquid Coolants
Both the Thermo Generator and the Reactor multiblock require liquid coolants to function. Create a 'PowahEvents.registerCoolants' listener in your script file. Use 'event.addFluid("modid:fluid_id", coldnessValue)' to register a liquid, or 'event.addSolid("modid:item_id", coldnessValue)' to add a solid coolant like Blue Ice or Dry Ice for the Reactor.
Tip: Coolant values for fluids typically range from 1 (like standard Water) up to much higher numbers for cryogenic modded fluids.
6Add Custom Thermo Generator Heat Sources
To allow a new block to heat the Thermo Generator from below, create a 'PowahEvents.registerHeatSources' listener. Call 'event.add("modid:block_id", heatValue)' for solid blocks like custom compressed magma, or 'event.addFluid("modid:fluid_id", heatValue)' for in-world fluid blocks placed beneath the machine. Higher heat values directly translate to higher FE/t generation when paired with a valid coolant.
Tip: Compare your custom heat values against Powah's native Blazing Crystal Block in JEI to avoid accidentally overshadowing late-game progression.
7Reload Scripts and Test In-Game
Save your 'powah_custom.js' file and return to your running Minecraft instance. Run the '/reload' command in chat and watch the chat log or the 'kubejs/logs/server.log' file for any syntax errors. Place down an Energizing Orb with a few Energizing Rods, a Magmator, and a Thermo Generator in a creative test world to physically verify that your new recipes and generator values work as expected.
How it works
Powah! (Rearchitected) separates its data handling into two distinct systems: standard Minecraft recipe managers and custom internal registries. The Energizing Orb utilizes the standard recipe manager under the 'powah:energizing' serializer. When you use 'event.custom()' in KubeJS, you are dynamically injecting a virtual JSON datapack entry directly into the server's recipe manager during the reload phase. The Energizing Orb reads the 'energy' key from this JSON and communicates with nearby linked Energizing Rods, drawing power until the internal buffer matches your script's requirement.
Conversely, generator statistics for the Magmator, Thermo Generator, and Reactor (heat sources, magmatic fluids, and coolants) are stored in Powah's internal map registries rather than standard recipe tables. Powah! natively exposes custom KubeJS event hooks ('PowahEvents') specifically for modpack makers. When you call 'event.add()' inside these hooks, your script directly mutates Powah's internal hash maps during server startup or reload, allowing the machines to immediately recognize modded blocks and fluids when evaluating adjacent tiles or internal tanks.
Common mistakes
- Exceeding six ingredients in an Energizing Orb recipe: The Energizing Orb has a strict hardcap of 6 item slots. Adding a 7th ingredient in your KubeJS array will cause the recipe to fail or throw a deserialization error.
- Using bucket item IDs instead of fluid IDs: When configuring Magmator fuels or Thermo coolants, passing 'minecraft:lava_bucket' instead of 'minecraft:lava' will silently fail because the internal tank checks for fluid registry keys, not item containers.
- Using item tags improperly in custom JSON: Inside 'event.custom()', you cannot use KubeJS shorthand like '#forge:ingots/iron'. You must write raw JSON format: '{ tag: "forge:ingots/iron" }' or '{ item: "minecraft:iron_ingot" }'.
- Setting Energizing energy costs too high for early-game rods: If you create an early-game recipe requiring tens of millions of FE, players with Starter or Basic Energizing Rods will wait an impractical amount of time. Always scale the 'energy' integer to match the tier of Energizing Rod the player currently has access to.
FAQ
Why do my custom heat sources or coolants not show up in JEI immediately after running /reload?
While standard recipes update instantly on '/reload', JEI caches custom registry wrappers like Powah's heat and coolant tabs on client connection. If they do not appear in JEI, test the machine physically in the world, or exit to the main menu and rejoin the world to refresh the JEI client cache.
How do I allow an Energizing Orb recipe to accept multiple items of the same type?
The Energizing Orb JSON format does not support a 'count' key inside the 'ingredients' array. To require multiple copies of the same item (up to 6 total), you must list the item object multiple times inside the 'ingredients' array.
Can I use negative numbers in registerHeatSources to cool the Thermo Generator from below?
No, the block placed underneath a Thermo Generator must have a positive heat value to generate power. Cooling is strictly handled by the fluid pumped into the Thermo Generator's internal tank via the coolant registry.
Does KubeJS recipe modification work across Forge, Fabric, and NeoForge for Powah! (Rearchitected)?
Yes, the 'event.custom()' JSON structure for the Energizing Orb is identical across all loaders. However, on NeoForge 1.21+, ensure you are using the latest KubeJS syntax as global event names and item result schemas (like 'id' instead of 'item' in 1.21) follow vanilla datapack changes.
By leveraging KubeJS custom JSON recipes alongside Powah's dedicated registry events, you can seamlessly overhaul the Energizing Orb, Magmator, Thermo Generator, and Reactor to fit any custom modpack progression.