mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-25 01:15:24 +02:00
fixed bug were pathfinding wouldn't work
fixed race condition with "await" gets death position before attempting to path find to death position
This commit is contained in:
parent
f827bb0a20
commit
015bf686ee
1 changed files with 1 additions and 1 deletions
|
@ -1194,7 +1194,7 @@ export async function goToDeath(bot, agent) {
|
|||
* @example
|
||||
* await skills.goToDeath(bot);
|
||||
**/
|
||||
let death_pos = agent.memory_bank.recallPlace('last death position')[0]; // <- dont even ask why this is an array
|
||||
let death_pos = await agent.memory_bank.recallPlace('last death position')[0]; // <- dont even ask why this is an array
|
||||
if (death_pos) {
|
||||
await goToPosition(bot, death_pos.x, death_pos.y, death_pos.z);
|
||||
log(bot, `You have reached the death point.`);
|
||||
|
|
Loading…
Add table
Reference in a new issue