Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local placer = "left"
- local laser = "right"
- local function find_slot()
- for i = 1, 16 do
- if turtle.getItemCount(i) == 0 then
- return true
- end
- end
- return false
- end
- local function pulse(side)
- rs.setOutput(side, true)
- sleep(0.2)
- rs.setOutput(side, false)
- sleep(0.2)
- end
- local function is_non_stone(front)
- local exists, what = turtle.inspect()
- return exists and type(what) == "table" and what.name ~= "minecraft:stone"
- end
- local function is_stone(front)
- local exists, what = turtle.inspect()
- return exists and type(what) == "table" and what.name == "minecraft:stone"
- end
- while true do
- repeat sleep() until turtle.detect()
- repeat pulse(laser) print "attempting conversion to ore" until is_non_stone()
- if find_slot() then turtle.dig() end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement