mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-22 06:02:07 +02:00
remove unnecessary "goToDeath()" skill
this code is unnecessary the bot can use "!goToPlace('last_death_position')"
This commit is contained in:
parent
eb0719d4e3
commit
ac545acf51
1 changed files with 0 additions and 19 deletions
|
@ -1185,25 +1185,6 @@ export async function goToBed(bot) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function goToDeath(bot, agent) {
|
|
||||||
/**
|
|
||||||
* Navigate to the last death point.
|
|
||||||
* @param {MinecraftBot} bot, reference to the minecraft bot.
|
|
||||||
* @param {Agent} agent, reference to the agent.
|
|
||||||
* @returns {Promise<boolean>} true if the death point was found, false otherwise.
|
|
||||||
* @example
|
|
||||||
* await skills.goToDeath(bot);
|
|
||||||
**/
|
|
||||||
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.`);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
log(bot, `Could not find the death point.`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function tillAndSow(bot, x, y, z, seedType=null) {
|
export async function tillAndSow(bot, x, y, z, seedType=null) {
|
||||||
/**
|
/**
|
||||||
* Till the ground at the given position and plant the given seed type.
|
* Till the ground at the given position and plant the given seed type.
|
||||||
|
|
Loading…
Add table
Reference in a new issue