From 015bf686ee82bb8b4a7286d3f35da71c9124c717 Mon Sep 17 00:00:00 2001 From: Lawtro37 <98205608+Lawtro37@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:01:46 +1000 Subject: [PATCH] fixed bug were pathfinding wouldn't work fixed race condition with "await" gets death position before attempting to path find to death position --- src/agent/library/skills.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent/library/skills.js b/src/agent/library/skills.js index fd53bc3..e379f10 100644 --- a/src/agent/library/skills.js +++ b/src/agent/library/skills.js @@ -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.`);