diff --git a/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java b/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java index 78d56ad6c..aeecf1d52 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java +++ b/src/main/java/dan200/computercraft/shared/turtle/apis/TurtleAPI.java @@ -661,6 +661,18 @@ public class TurtleAPI implements ILuaAPI * @return The turtle command result. * @cc.treturn boolean Whether there is a block in front of the turtle. * @cc.treturn table|string Information about the block in front, or a message explaining that there is no block. + * @cc.usage
{@code + * local has_block, data = turtle.inspect() + * if has_block then + * print(textutils.serialize(data)) + * -- { + * -- name = "minecraft:oak_log", + * -- state = { axis = "x" }, + * -- tags = { ["minecraft:logs"] = true, ... }, + * -- } + * else + * print("No block in front of the turtle") + * end}*/ @LuaFunction public final MethodResult inspect()