Skip to content

About

Factorio-style queued crafting plans for NeoForge: chain-crafts intermediates, reserves up front, refunds on cancel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

375 Commits

Folders and files

Repository files navigation

Craftworks

Craftworks adds automated crafting in the spirit of Factorio. The Personal Assembler replaces the player's 2x2 crafting grid: pick the item you want in EMI (or JEI), and every intermediate step is planned for you. Turning on EMI Craftables sidebar makes things even easier: it lists everything the Personal Assembler can make from what you're carrying, intermediates included.

The whole cost is taken up front, and the crafts run one after another over time while you keep playing. Two placed machines carry on from there, both powered by FE: the Assembler, which crafts one chosen recipe over and over, with fluids too, and the Refiner, an electric furnace that smelts without fuel.

NeoForge, Minecraft 26.1.2 only. Craftworks is early work, so please report any issues you find on GitHub.

To play Craftworks beside every other FactoryWorks mod, install the FactoryWorks Showcase modpack from CurseForge.

Craftworks is built for modpacks. The Assembler crafts craftworks:assembling recipes: vanilla's and other mods' crafting recipes out of the box, and whatever a pack or datapack adds or replaces.

First steps

  1. Open your inventory: it is the Assembler. There is no 2x2 crafting grid. While nothing is queued, a hint stands where it was.
  2. Find the item in EMI or JEI and press + (Fill Recipe; in JEI, the recipe button) on its Assembling recipe: left click queues 1, right click 5, Shift as many as your inventory covers. For your first planks, look up planks and press + with a log in your inventory.
  3. Middle-click + to see the Crafting Plan before you commit: what it would take, what it would make on the way, and anything Missing or Locked.
  4. In EMI, turn on the Craftables sidebar page to see everything you can make from what you carry.
  5. A placed Assembler works the same way. Open its screen and press + on a recipe: Fill Recipe there sets its Held recipe, which it then makes over and over.

Features

  • Ask for the item, not the steps. Find an item in EMI or JEI and press Fill Recipe (JEI: the recipe button) on its Assembling recipe: left click queues 1, right click 5, Shift as many as your inventory covers. Every intermediate is resolved for you, so asking for a machine plans the plates, gears and circuits that go into it.
  • See what you can make. In EMI, turn on the Craftables sidebar page in its config. Craftworks adds to it every recipe the Personal Assembler can make from what you carry, intermediates included, and keeps it current while the inventory is open. Click an entry, a favorite or an index stack to queue it: left 1, right 5, Shift all. EMI's own binds win, and its view-uses sits on right click by default, so to queue 5 with right click unbind view-uses there (EMI config, Binds). JEI has no such list.
  • Paid up front, crafted over time. The whole cost of a request is taken when you queue it, and each step takes its own craft time. Results land in your inventory as they finish; a full inventory pauses the queue until there is room.
  • The inventory is the Assembler. The 2x2 crafting grid is gone, and the queue sits where it was. With the inventory closed, the queue shows beside the hotbar.
  • The Crafting Plan. Middle-click Fill Recipe or the JEI button to see what a request would consume, the intermediates it would make, and anything Missing (you have none and nothing can make it) or Locked (not yours to use yet). Queue +1, +5 or All from there, and watch the plan update as you do.
  • Cancel what you don't need. Click a queue row to cancel crafts of it: left 1, right 5, Shift all. Everything is refunded, and whatever is left is planned again in its place in the queue.
  • Nothing is lost. The queue survives logging out, and on death it is refunded into your inventory before your items drop.

For pack authors

  • Assembling recipes. A datapack adds craftworks:assembling recipes: ingredients with counts and tags and a results list of item stacks (each may be left out when empty, as in a recipe that only uses and makes fluids), a category (crafting by default, or advanced-crafting, crafting-with-fluid for any recipe with a fluid in or out that is not brewed, or brewing), a time in ticks (default 10) and a priority (default 0). Optional fluid_ingredients and fluid_results are for an Assembler to handle (each fluid box holds 2,000 mB, so a recipe needing more of one fluid in a craft is refused; a pinned_fluid_results left in an older recipe is ignored), and hand_craftable (default true) set false keeps an item-only recipe for one: the Personal Assembler plans only through a recipe that is hand-craftable and names no fluid and has exactly one item result. EMI and JEI show them, and KubeJS scripts can create and edit them.
  • Vanilla recipes built in. Vanilla's crafting recipes are Assembling recipes out of the box, at their own ids, so they replace the crafting table's; special recipes like fireworks and dyeing stay at the table. Set vanillaRecipes = false in the server config to ship your own set instead.
  • Other mods' recipes converted. Every other mod's shaped and shapeless crafting recipes become Assembling recipes at their own ids as recipes load, after your datapacks and KubeJS scripts; your own Assembling recipe at the same id wins. Keep a mod's or a recipe's at the table with modRecipesExcluded = ["modid", "modid:recipe"], or turn it off with modRecipes = false.
  • Brewing from water. The brewing stand's mixes, vanilla's and other mods' (a NeoForge BrewingRecipe), become Assembling recipes in the brewing category at craftworks:brewing/... ids as recipes load: each chain of brews from a water bottle is one recipe taking 3 glass bottles, 750 mB of water and one of each ingredient along the chain, and making 3 of what it ends in (a chain needing more than five different ingredients with the bottles, more than an Assembler's input slots, gets no recipe). No blaze powder; an Assembler pays FE. brewingRecipes = false keeps brewing at the stand, and modRecipesExcluded can name a brewed recipe's id.
  • Route priority. When several recipes make the same item, the Assembler uses the highest-priority one the player can complete, at every level of the plan.
  • Assemblers. Three tiers of placed machine make one Assembling recipe each, their Held recipe, which you set with Fill Recipe on the open screen. Any FE source powers them, and each tier's speed, power and buffer are in the server config. Placing a higher or lower tier over one swaps it in place. Every tier also makes recipes with fluids, in or out, with or without items: two input fluid boxes and three output fluid boxes, on six Fluid Connections that pull the ingredients from a tank or pipe and push the results out. They stand at the ends of its front and back edges and the centres of its sides, so no two pipes beside them touch and each fluid of a recipe gets a network of its own. The tiers differ only in speed, power and buffer.
  • The Refiner. A placed machine that smelts what vanilla's furnace and blast furnace do, on FE and no fuel: any vanilla smelting or blasting recipe, blasting where an input has both. Its speed, power and buffer are in the server config. Pipes and hoppers put in what a recipe smelts, up to two smelts' worth, and take out only the result. It smelts one item into one result; smelting with several inputs or results is an Assembling recipe, made by an Assembler.
  • Locking recipes. The server config lockSources decides what keeps a recipe Locked for a player: recipeBook (until the recipe is in their recipe book). Other mods add their own locks, with or without a reason, through io.github._5thlayer.craftworks.api.LockHooks.

Dependencies

  • EMI or JEI, one of them on the client: the Assembler has no item list of its own and takes requests through EMI's Fill Recipe or JEI's recipe button. EMI is the better companion, as only its Craftables page lists what the Personal Assembler can make for you. A pack ships one, not both. A dedicated server needs neither.
  • Groundworks, required: the Assemblers stand on its footprint and swap tiers by its Fast Replace. Install it beside Craftworks; it is not bundled.
  • Pipeworks, optional: its pipes fill and drain the Assemblers' Fluid Connections, and any other mod's tanks and pipes do too.
  • Jade, optional: shows the machines' Held recipe, state, progress and energy in its tooltip.
  • KubeJS, optional: scripts create and edit Assembling recipes and lock recipes for a player.

License

MIT. The cover art uses Minecraft's item textures, which remain Mojang's. Source is on GitHub.

About

Factorio-style queued crafting plans for NeoForge: chain-crafts intermediates, reserves up front, refunds on cancel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages