1
0
Go to file
2023-05-11 21:39:09 +03:00
craft.lua initial commit 2023-05-11 21:39:09 +03:00
README.md initial commit 2023-05-11 21:39:09 +03:00

CC crafter

Given a layout of items, the turtle will reaarrange everything in its inventory so it would be able to craft the target item.

Example:

local craft = require("craft")

local piston_recipe = {
	"minecraft:oak_planks",  "minecraft:oak_planks", "minecraft:oak_planks",
	"minecraft:cobblestone", "minecraft:iron_ingot", "minecraft:cobblestone",
	"minecraft:cobblestone", "minecraft:redstone",   "minecraft:cobblestone"
}

-- This will craft 8 pistons and return how many were successfully crafted
print(craft(piston_recipe, 8))