Advertisement
Guest User

ore.lua

a guest
Dec 12th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local Ore = {}
  2.  
  3. local oreTable = {
  4.     ["minecraft:iron_ore"]=true
  5. }
  6.  
  7. local function oreFront()
  8.     success, data = turtle.inspect()
  9.     if success and oreTable[data.name] then
  10.         return true, data.name
  11.     end
  12.     return false, nil
  13. end
  14.  
  15. function Ore.lookForOre()
  16.     success, ore = oreFront()
  17.     if success then
  18.         return success, ore
  19.     end
  20.     return false, nil
  21. end
  22.  
  23. return Ore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement