turtle.inspectDown
From ComputerCraft Wiki
Function turtle.inspectDown | |
Returns the ID string and metadata of the block below the Turtle in a table format: { name = "modname:blockname", metadata = 0 }. | |
Syntax | turtle.inspectDown() |
Returns | boolean success, table data/string error message |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
If there is a block below the turtle, prints it's name and metadata. | |
Code |
local success, data = turtle.inspectDown() if success then print("Block name: ", data.name) print("Block metadata: ", data.metadata) end |
Additional Notes
- Returns false when there is nothing (air) below the Turtle.