KubeJS + Tinkers' Construct: Custom Casting via Scripts
For modpack authors and server administrators who crave fine-grained control over every crafting mechanic, the synergy between KubeJS and Tinkers' Construct is a game-changer. This addon unlocks the ability to define custom casting recipes, manipulate fluid interactions, and adjust cooling times—all through straightforward server-side scripts. No more digging into jar files or wrestling with complex datapacks; you simply write JavaScript-based logic that the game executes seamlessly. Whether you're building a hardcore progression pack or a whimsical kitchen-sink experience, this integration puts the smeltery's behavior at your fingertips.
What This Integration Brings to Your Modpack
Tinkers' Construct has long been the cornerstone of tool forging, alloying, and modular equipment. KubeJS, on the other hand, excels at dynamic recipe management and event handling. When these two mods collaborate, you gain a powerful toolkit to reshape the casting system. You can introduce or remove casting table and basin recipes to match your server's economy, link fluids from other mods to specific outputs without touching source files, and fine-tune cooling durations so that progression feels organic. This approach shines in packs where biome-specific resources, rare ores, and custom gating mechanics are essential—you guide players from copper to steel and beyond without breaking the vanilla feel.
Scripting Casting Table Recipes
The casting table is the workhorse for small-scale outputs like ingots, nuggets, and tool parts. In your KubeJS scripts, you typically invoke event.recipes.tconstruct.casting_table with a target item and a fluid identifier. A basic recipe might specify that a particular fluid yields a specific result; you can also define the fluid volume in millibuckets. If you omit the volume, the system often defaults to a sensible ingot-sized amount. This flexibility lets you incorporate water or lava into humorous or narrative-driven recipes without cluttering the player's interface with extra crafting steps. The API is designed to be intuitive, so you can quickly prototype and iterate.
Scripting Casting Basin Recipes
For bulk operations—blocks, large components, or mass fluid transfers—the casting basin is the natural choice. The call event.recipes.tconstruct.casting_basin mirrors the table's structure but expects larger default fluid volumes, reflecting the basin's role in heavier castings. Methods for handling molds and cooling times largely overlap with the table, which means you can reuse patterns and reduce errors across your modpack. This consistency in the API design helps you memorize templates faster, making script maintenance less of a chore.
Molds, Cooling Times, and Advanced Tweaks
Understanding the chain of "fluid → mold → result" is key to creating intuitive recipes. The API offers options like specifying a default mold, omitting a mold entirely, using single-use or reusable molds, and even switching slots for unconventional setups. Cooling time is measured in ticks and can differ between the table and basin—this becomes a direct balancing lever. Faster cooling makes automated farms more attractive, while slower cooling forces players to plan energy and automation infrastructure. Start with default values and adjust after testing with multiple players on a server to find the sweet spot.
A Practical Scripting Scenario
Imagine you want to inject a lighthearted farming quest: a carrot emerges from the casting table when you combine a strange fluid with a single-use mold, while a block of coal forms from lava in the basin. In one script file, you group the recipe calls, name the script clearly, and verify that the fluids exist in your pack. After editing, reload recipes according to your KubeJS workflow and check JEI or a similar mod to confirm the chains display correctly. Common pitfalls include typos in fluid IDs, incorrect mold tags, or script load order conflicts where another script overwrites your recipes later in the sequence.
Installation and Compatibility
To get started, you need to download KubeJS + Tinkers' Construct: Custom Casting via Scripts from a trusted platform like CurseForge or Modrinth. This addon is designed for the Forge mod loader and supports Minecraft versions 1.18.2, 1.19.2, and 1.20.1. Ensure you have the required dependencies: KubeJS and Tinkers' Construct of matching versions. The installation process is straightforward—place the downloaded jar file into your mods folder. If you're using a launcher like foxygame.net, you can install it directly from the interface and then sync the profile to your server or single-player world. Once installed, you can begin writing scripts in the kubejs/server_scripts directory. For those wondering how to install, simply follow the standard mod addition procedure: drop the file, launch the game, and start scripting.
Conclusion
KubeJS + Tinkers' Construct: Custom Casting via Scripts for Minecraft is not a magic button but a transparent, scriptable layer that preserves the spirit of tool crafting and smeltery mechanics while granting you full authority over recipes. Begin with a couple of straightforward castings, validate fluid volumes and mold behavior, then expand to integrate with other mods and shape a coherent progression. This approach keeps your pack honest, your updates manageable, and your players engaged with a living, breathing crafting system.