mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52:07 +02:00
forgotten item_goal.js
This commit is contained in:
parent
434f295a9e
commit
6a17de7bf6
1 changed files with 2 additions and 2 deletions
|
@ -322,7 +322,7 @@ export class ItemGoal {
|
|||
// If the bot has failed to obtain the block before, explore
|
||||
if (this.failed.includes(next.name)) {
|
||||
this.failed = this.failed.filter((item) => item !== next.name);
|
||||
await this.agent.tasks.runTask('itemGoal:explore', async () => {
|
||||
await this.agent.actions.runAction('itemGoal:explore', async () => {
|
||||
await skills.moveAway(this.agent.bot, 8);
|
||||
});
|
||||
} else {
|
||||
|
@ -339,7 +339,7 @@ export class ItemGoal {
|
|||
|
||||
// Execute the next goal
|
||||
let init_quantity = world.getInventoryCounts(this.agent.bot)[next.name] || 0;
|
||||
await this.agent.tasks.runTask('itemGoal:next', async () => {
|
||||
await this.agent.actions.runAction('itemGoal:next', async () => {
|
||||
await next.execute(quantity);
|
||||
});
|
||||
let final_quantity = world.getInventoryCounts(this.agent.bot)[next.name] || 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue