inspect
Inspects a block in the specified direction and returns the block ID or data.
agent.inspect(AgentInspection.Block, FORWARD);
Parameters
- kind: the desired result type for the detection: block id or data
- direction: the direction in which to inspect, eg: FORWARD
Example
The following inspects the block in front of the agent, and places the same block type above the player’s head.
blocks.place(agent.inspect(AgentInspection.Block, FORWARD), pos(0, 2, 0));