fixed example

This commit is contained in:
Kolby Nottingham 2024-12-12 18:53:24 -08:00
parent 58d38af369
commit 883f73eef5
2 changed files with 3 additions and 4 deletions

View file

@ -1,7 +1,6 @@
{ {
"debug_single_agent": { "debug_single_agent": {
"goal": "Just stand at a place and don't do anything", "goal": "Just stand at a place and don't do anything",
"guidance": null,
"initial_inventory": {}, "initial_inventory": {},
"type": "debug" "type": "debug"
}, },

View file

@ -173,16 +173,16 @@ export class Task {
bot.chat(`/tp ${name} ${Math.floor(pos.x + xOffset)} ${pos.y + 3} ${Math.floor(pos.z + zOffset)}`); bot.chat(`/tp ${name} ${Math.floor(pos.x + xOffset)} ${pos.y + 3} ${Math.floor(pos.z + zOffset)}`);
await new Promise((resolve) => setTimeout(resolve, 200)); await new Promise((resolve) => setTimeout(resolve, 200));
} }
if (this.data.agent_count && this.data.agent_count > 1) { if (this.data.agent_count && this.data.agent_count > 1) {
// TODO wait for other bots to join
await new Promise((resolve) => setTimeout(resolve, 10000)); await new Promise((resolve) => setTimeout(resolve, 10000));
if (available_agents.length < this.data.agent_count) { if (available_agents.length < this.data.agent_count) {
console.log(`Missing ${this.data.agent_count - available_agents.length} bot(s).`); console.log(`Missing ${this.data.agent_count - available_agents.length} bot(s).`);
this.agent.cleanKill('Not all required players/bots are present in the world. Exiting.', 4); this.agent.cleanKill('Not all required players/bots are present in the world. Exiting.', 4);
} }
} }
if (this.data.goal) { if (this.data.goal) {
await executeCommand(this.agent, `!goal("${this.data.goal}")`); await executeCommand(this.agent, `!goal("${this.data.goal}")`);
} }