hevohevo

CC: exercise7_2

May 19th, 2016
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. -- exercise7_2
  2. -- 特定のブロックを除いて、すべてのブロックを採掘するプログラム
  3.  
  4. -- ##### Config #####
  5. local unnecessaryBlock = "minecraft:cobblestone"
  6.  
  7. -- ##### Main #####
  8. local success, data = turtle.inspect()
  9.  
  10. if success then
  11.   print("find:", data["name"])
  12.   if data["name"] == unnecessaryBlock then
  13.     print(" -> I didn't dig")
  14.   else
  15.     print(" -> I dug")
  16.     turtle.dig()
  17.   end
  18. else
  19.   print("not find: ",data)
  20. end
Add Comment
Please, Sign In to add comment