paramus

Autocrafter

Jul 2nd, 2026 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | Gaming | 0 0
  1. -- This code is designed to work only on Turtles with empty inventories
  2. local turtleInventory = peripheral.wrap("cctweaked:turtle_0")
  3. local inputChest = peripheral.wrap("minecraft:chest_8")
  4. local inputChestName = peripheral.getName(inputChest)
  5.  
  6. while (true) do
  7.     local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
  8.     if (message == "CRAFT") then
  9.         turtle.craft()
  10.         -- Return item/items to inventory
  11.         for i=1,16 do
  12.             turtleInventory.pushItems(inputChestName, i)
  13.         end
  14.     end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment