Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blocks_to_mine = {
- "thermalfoundation:ore",
- "minecraft:diamond_ore"
- "minecraft:iron_ore"
- "minecraft:coal_ore"
- "minecraft:gold_ore"
- "minecraft:redstone_ore"
- "minecraft:emerald_ore"
- "quark:biotite_ore"
- }
- blocks_to_throw = {
- "minecraft:cobblestone",
- "minecraft:andesite",
- "minecraft:diorite",
- "minecraft:granite",
- "minecraft:sand",
- "minecraft:gravel",
- "minecraft:sandstone"
- }
- function check_block()
- local _,front_inspect = turtle.inspect()
- for i=1, #blocks_to_mine do
- if front_inspect.name == blocks_to_mine[i] then
- return true
- else
- return false
- end
- end
- end
- function check_refuel()
- if turtle.getFuelLevel() < turtle.getFuelLimit() then
- for i=1,16 do
- if turtle.getItemDetail(i) == "minecraft:coal" then
- turtle.select(i)
- turtle.refuel()
- break
- end
- end
- end
- function check_full_inv()
- for i=1,16 do
- if turtle.getItemDetail(i) != nil then
- return false
- else
- return true
- end
- end
- end
- function throw_blocks()
- for k=1,16 do
- for i=1, #blocks_to_throw do
- if turtle.getItemDetail(k) == blocks_to_throw[i] then
- turtle.select(k)
- turtle.drop()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment