From eb0719d4e378ca72bfb04cb6d5d8a8f7e782389b Mon Sep 17 00:00:00 2001 From: Lawtro37 <98205608+Lawtro37@users.noreply.github.com> Date: Sun, 3 Nov 2024 12:28:20 +1000 Subject: [PATCH] modified message sent to AI modified message sent to AI fixed miss spelling of "dimension" removed code to save to memory as this is already done by "handleMessage()" --- src/agent/agent.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/agent/agent.js b/src/agent/agent.js index 745c08f..60f2406 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -261,14 +261,13 @@ export class Agent { if (jsonMsg.translate && jsonMsg.translate.startsWith('death') && message.startsWith(this.name)) { console.log('Agent died: ', message); let death_pos = this.bot.entity.position; - this.memory_bank.rememberPlace('last death position', death_pos); + this.memory_bank.rememberPlace('last_death_position', death_pos); let death_pos_text = null; if (death_pos) { death_pos_text = `x: ${death_pos.x.toFixed(2)}, y: ${death_pos.y.toFixed(2)}, z: ${death_pos.x.toFixed(2)}`; } let dimention = this.bot.game.dimension; - this.history.add('system', `You died at position ${death_pos_text || "unknown"} with the final message: '${message}'. Previous actions were stopped and you have since respawned.`); - this.handleMessage('system', `You died at position ${death_pos_text || "unknown"} in the dimention ${dimention} with the final message: '${message}'. Previous actions were stopped and you have respawned. Notify the user and perform any necessary actions. use !goToDeath to return to death position. (this will automaticly take you to your death position and pick up your items)`); + this.handleMessage('system', `You died at position ${death_pos_text || "unknown"} in the ${dimention} dimension with the final message: '${message}'. Your place of death is saved as 'last_death_position' if you want to return. Previous actions were stopped and you have respawned.`); } }); this.bot.on('idle', () => {