size = 10 function tablelength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end function refuel() print(turtle.getFuelLevel()) if turtle.getFuelLevel() < 200 then found = find("minecraft:coal") if found then turtle.select(found) turtle.refuel(4) end end end intebajs = {'minecraft:diamond', 'minecraft:iron_ore', 'minecraft:gold_ore', 'minecraft:emerald', 'minecraft:obsidian', 'minecraft:coal'} function in_list (tab, val) for index, value in ipairs(tab) do if value == val then return true end end return false end function throw_shit() for i = 1,16 do sname = turtle.getItemDetail(i) if sname then if not in_list(intebajs,sname.name) then turtle.select(i) turtle.dropDown() end end end end function find(name) for i = 1,16 do sname = turtle.getItemDetail(i) if sname then sname = sname.name if name == sname then return i end end end return false end function mine() turtle.dig() turtle.digUp() turtle.digDown() suc = turtle.forward() return suc end function walk (len) x = 0 while x < len do if mine() then x = x + 1 end end end for i = 0,size do walk(size - i) refuel() turtle.turnRight() throw_shit() walk(size - i) turtle.turnRight() throw_shit() end