Wassaa

trythis

Oct 25th, 2021 (edited)
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. function checkLog()
  2.     if turtle.getItemDetail() then
  3.         amount = turtle.getItemDetail().count
  4.     end
  5.     failLog = "minecraft:stripped_acacia_log"
  6.     goodLog = "minecraft:acacia_log"
  7.     hasblock, data = turtle.inspectDown()
  8.     if hasblock then
  9.         if data.name == failLog then
  10.             turtle.digDown()
  11.             print("cleaned out Trash Log")
  12.             turtle.select(2)
  13.             turtle.drop()
  14.             turtle.select(1)
  15.         else
  16.             print("nice and beautiful " .. data.name)
  17.             os.sleep(2)
  18.         end
  19.         if amount ~= nil then
  20.             print(amount .. " logs left")
  21.             if amount < 64 then
  22.                 turtle.suckUp(64-amount)
  23.                 print("got " .. 64-amount .. " more Logs")
  24.             end
  25.         else
  26.             turtle.suckUp()
  27.             print("I was all out")
  28.         end      
  29.      else
  30.         turtle.select(1)
  31.         turtle.placeDown()
  32.         print("New ACACACACACA")
  33.         os.sleep(2)
  34.      end
  35. end
  36.  
  37. while true do
  38.     checkLog()
  39. end
  40.    
  41.  
  42.  
Add Comment
Please, Sign In to add comment