KubeJS + Tinkers' Construct: Custom Casting via Scripts
Modpack authors and server operators frequently need to adjust recipes without altering core mod files. The synergy between KubeJS and Tinkers' Construct provides a script-driven solution for casting tables, basins, and fluid handling. By writing concise server-side scripts, you can redefine how molten metals become tools, blocks, or novelty items, all while preserving pack stability and update compatibility.
Why Integrate KubeJS with Tinkers' Construct?
Tinkers' Construct is renowned for its tool progression, smeltery, and alloying mechanics. KubeJS introduces event hooks and recipe manipulation. Together, they enable you to:
- Add or remove casting recipes to align with your server's economy.
- Link fluids from any mod to custom outputs without touching source files.
- Fine-tune cooling times to make automation feel rewarding or demanding.
This combination excels in modpacks where biome-specific ores, rare resources, and gated progression are key. You can guide players from copper to steel without breaking vanilla logic, simply by scripting the casting chain.
How to Install and Compatibility
To begin, download KubeJS + Tinkers' Construct: Custom Casting via Scripts for Minecraft through your preferred launcher. The mod runs on Forge for versions 1.18.2, 1.19.2, and 1.20.1. Both KubeJS and Tinkers' Construct must be present as dependencies. If you are unsure how to install, most modern launchers allow you to search and add the mod directly to your instance. Place your script files inside the designated KubeJS folder, then execute a /reload command or restart the world to apply changes.
Scripting the Casting Table
The casting table handles single items like ingots or nuggets. In a KubeJS script, you invoke event.recipes.tconstruct.casting_table with the target output item and fluid identifier. You may specify the fluid volume in millibuckets; if omitted, a sensible default is applied. This simplicity makes it easy to add whimsical recipes—such as turning water into a carrot—or to enforce strict resource costs for high-tier metals.
Leveraging the Casting Basin
For blocks and bulk casting, the basin API mirrors the table but expects larger fluid amounts by default. The method event.recipes.tconstruct.casting_basin follows the same pattern, so mastering one teaches you both. This consistency reduces mistakes when managing dozens of custom recipes. Cooling time is set in ticks and acts as a direct balance lever: faster cooling encourages farming setups, while slower cooling forces players to plan energy and automation.
Forms, Slots, and Cooling Control
Every casting recipe follows a fluid → form → result sequence. The API supports reusable forms, single-use forms, or formless casting. You can also switch slots for unconventional configurations. Cooling time can differ between table and basin, giving you precise control. Begin with default values, then refine after testing with a small player group. Common issues include typos in fluid IDs or form tag conflicts, so always verify recipes in JEI after reloading.
Practical Scenario: From Concept to Verification
Imagine a farming quest: you want a carrot to emerge from a strange fluid on the casting table with a single-use form, and a coal block from lava in the basin. Group both recipes in one script file, name it clearly, and confirm the fluids exist in your pack. After reloading, open JEI to ensure the recipes display correctly. If something fails, check for duplicate recipe definitions or load order conflicts—KubeJS processes scripts sequentially, so later scripts can overwrite earlier ones.
Stable Modpack Integration
When you download KubeJS + Tinkers' Construct: Custom Casting via Scripts, you gain a lightweight, text-based control panel for Tinkers' Construct. This method keeps your modpack maintainable across updates because you never edit jar files. All custom logic resides in scripts that you can version-control alongside your pack. For server owners, this means hotfixes without redistributing the entire modpack.
Start with a couple of simple casting recipes, test fluid volumes and forms, then expand to cross-mod interactions. The result is a fair, engaging progression that respects both the spirit of Tinkers' Construct and the flexibility of KubeJS.