Posted 10 June 2015 - 10:25 PM
Hello Pros! I'm very new to ComputerCraft and programming in general and I have a quick question.
Ive made this little test program to learn how to use the turtle.inspect command but I am not sure how to use the block name and metadata in my program.
I only know how to use the true and false and not the name or metadata. So for an example I would like to be able to detect if the block is "minecraft:wheat" with metadata 7 meaning full grown.
Any help would be greatly appreciated! hopefully you dont see too much of me in the Ask a Pro section in the future :)/>
Ive made this little test program to learn how to use the turtle.inspect command but I am not sure how to use the block name and metadata in my program.
turtle.refuel()
local i = 1
repeat
block = turtle.inspectDown()
if block == true then
turtle.digDown()
turtle.suckDown()
turtle.forward()
print("broke, sucked, and moved")
i = i + 1
else
turtle.forward()
print("no block, moved forward")
end
i = i + 1
until i == 20
I only know how to use the true and false and not the name or metadata. So for an example I would like to be able to detect if the block is "minecraft:wheat" with metadata 7 meaning full grown.
Any help would be greatly appreciated! hopefully you dont see too much of me in the Ask a Pro section in the future :)/>