feat: implement auto-crafting feature for excess stock management

This commit is contained in:
MayaTheShy
2026-03-25 18:07:26 -04:00
parent 2c99169ce9
commit f327f82677
6 changed files with 99 additions and 0 deletions

14
data/auto_craft.lua Normal file
View File

@@ -0,0 +1,14 @@
-- Auto-craft rules: items that should be automatically crafted when stock exceeds reserve.
-- The system will keep `reserve` of the input item and craft all excess into the output.
-- Requires a crafting turtle to be connected.
--
-- Format: { input = "mod:item", reserve = N, output = "mod:output_item" }
-- The output item must have a recipe in data/craftable.lua (or learned via recipeBook).
-- Recursive crafting is used, so intermediate steps are handled automatically.
return {
-- Convert excess bamboo into planks (keeps 128 raw bamboo as reserve)
{ input = "minecraft:bamboo", reserve = 128, output = "minecraft:bamboo_planks" },
-- Convert excess bamboo blocks into planks too (keeps 64 blocks as reserve)
{ input = "minecraft:bamboo_block", reserve = 64, output = "minecraft:bamboo_planks" },
}