Tetrikitty

ComputerCraft Gourmaryllis

Dec 26th, 2024 (edited)
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | Source Code | 0 0
  1. local modem = peripheral.wrap("bottom")
  2. local input_chest = "minecraft:chest_1"
  3. local output_crate = "botania:open_crate_"
  4. local num_foods = 6
  5. local num_crates = 4
  6. local crate_offset = 7
  7. local food_delay = 4
  8.  
  9. while (true) do
  10.   for food_id=1, num_foods do
  11.     while not redstone.getInput("back") do
  12.       sleep(4)
  13.     end
  14.     local item = modem.callRemote(input_chest, "getItemDetail", food_id)
  15.     if item and item.count > num_crates then
  16.       for crate_id=1, num_crates do
  17.         modem.callRemote(input_chest, "pushItems", output_crate..(crate_offset+crate_id), food_id, 1)
  18.       end
  19.       sleep(4)
  20.     end
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment