mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52:07 +02:00
modified "!goToDeath" to use new "goToDeath()" skill
this feels more clean and the new skill fixes some bugs note: also added "pickupNearbyItems()" so it picks up its items after death.
This commit is contained in:
parent
554574a767
commit
41282daeb2
1 changed files with 2 additions and 7 deletions
|
@ -299,13 +299,8 @@ export const actionsList = [
|
||||||
name: "!goToDeath",
|
name: "!goToDeath",
|
||||||
description: "Go to the location of your bot's last death position and retrieve any lost items.",
|
description: "Go to the location of your bot's last death position and retrieve any lost items.",
|
||||||
perform: wrapExecution(async (agent) => {
|
perform: wrapExecution(async (agent) => {
|
||||||
let death_pos = agent.memory_bank.recallPlace('last death position')[0]; // <- dont even ask why this is an array
|
await skills.goToDeath(agent.bot, agent);
|
||||||
if (death_pos !== null) {
|
await skills.pickupNearbyItems(agent.bot);
|
||||||
await skills.goToPosition(agent.bot, death_pos.x, death_pos.y, death_pos.z, 1);
|
|
||||||
console.log('going to death');
|
|
||||||
} else {
|
|
||||||
skills.log(agent.bot, "No death location saved.");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue