Advertisement
paperclip_tank

Juicer

Mar 11th, 2015
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.47 KB | None | 0 0
  1. --[[
  2. V 1.4
  3. Created by Minecraft user Paperclip_Tank for an automatic smoothie making machine in FTB infinite
  4.  
  5. Place storage containers in according locations
  6. Place starting item in each location
  7.  
  8. Berries  = Front  - Slot 1
  9. Snowball = Bottom - Slot 2
  10. Output   = Top    - Slot 3
  11. Juicer   =        - Slot 5
  12. ============================
  13. Modem Side - Left
  14. Crafting   - Right
  15.  
  16. Display  - Displays number of made items - REMOVED WIRELESS
  17. Supply   - Checks to make sure there are enough Berries and Snowballs - refills as needed
  18. Create   - Checks to make sure there are enough Berries, Snowballs, space for new smoothie - creates new smoothie
  19. DropOff  - Drops off created smoothies into container
  20. --]]
  21.  
  22.  
  23. local count = 0
  24.  
  25. local function counting()
  26.   count = count + 1
  27. end
  28.  
  29. local function display()
  30.    term.clear()
  31.    term.setCursorPos(1,1)
  32.    print(count)
  33. end
  34.  
  35. local function supply()
  36. if turtle.getItemCount(1) < 2 then
  37.    turtle.select(1)
  38.    turtle.suck(62)
  39.    end
  40. if turtle.getItemCount(2) < 2 then
  41.    turtle.select(2)
  42.    turtle.suckDown(14)
  43.    end
  44. end
  45.  
  46. local function create()
  47. if turtle.getItemCount(3) == 0 then
  48.    if turtle.getItemCount(1) > 1 then
  49.        if turtle.getItemCount(2) > 1 then
  50.           counting()
  51.           turtle.select(1)
  52.           turtle.craft()
  53.        end
  54.      end
  55.   end
  56. end
  57.  
  58. local function dropOff()
  59.   turtle.select(3)
  60.   turtle.dropUp()
  61. end
  62.  
  63. while true do
  64.    supply()
  65.    create()
  66.    dropOff()
  67.    display()
  68.    sleep(.8)
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement