destroy
Commands the agent to destroy a block in the given direction.
agent.destroy(FORWARD);
Parameters
- direction: the direction in which the agent will destroy a block, eg: FORWARD
Example
If there’s a block in front of the agent, the agent will destroy it.
if (agent.detect(AgentDetection.Block, FORWARD)) {
agent.destroy(FORWARD);
}