Posted 30 July 2013 - 02:53 AM
Title: How can I make a turtle /select/break specific blocks?
I was wondering if I can make a turtle better at mining by getting it to drop specific items like cobblestone and dirt, and if it is, for example, just doing a basic tunnel, and it detects a diamond on the side, it will mine that diamond then continue with the tunneling. This is no request for a big code or something, I am just wondering if there is a way to make a code kind of like this one (not one I am trying to use, just making something up to make it more understandable)
Something like that so when it is digging if there is Diamond/gold/iron ore the to right it will mine it. If this is possible please help and if it is not, it's alright I can manage without it! Thank!
I was wondering if I can make a turtle better at mining by getting it to drop specific items like cobblestone and dirt, and if it is, for example, just doing a basic tunnel, and it detects a diamond on the side, it will mine that diamond then continue with the tunneling. This is no request for a big code or something, I am just wondering if there is a way to make a code kind of like this one (not one I am trying to use, just making something up to make it more understandable)
a = 1
while a ~=50 do
turtle.digForward()
turtle.forward()
a = a + 1
if turtle.detectRight() = DiamondOre, GoldOre, IronOre then
turtle.turnRight()
turtle.dig()
turtle.turnLeft()
while a ~=50 do
turtle.digForward()
turtle.forward()
a = a + 1
end
Something like that so when it is digging if there is Diamond/gold/iron ore the to right it will mine it. If this is possible please help and if it is not, it's alright I can manage without it! Thank!