collect All

Commands the agent to collect all nearby blocks and items.

agent.collectAll();

Example

Makes the agent follow the player and collect any nearby block or item.

loops.forever(() => {
    agent.teleportToPlayer();
    agent.collectAll();
});

See Also

collect