mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-09-10 12:02:59 +02:00
docs: Update goToPosition documentation for door handling
- Add note about automatic door detection and opening - Update JSDoc comments to reflect new capability - Include example comment showing door behavior
This commit is contained in:
parent
3884f9eba0
commit
9bb3e9b399
1 changed files with 3 additions and 1 deletions
|
@ -1093,7 +1093,8 @@ async function detectDoorsInPath(bot, targetX, targetY, targetZ) {
|
|||
|
||||
export async function goToPosition(bot, x, y, z, min_distance=2) {
|
||||
/**
|
||||
* Navigate to the given position.
|
||||
* Navigate to the given position with automatic door handling.
|
||||
* This function automatically detects and opens any closed doors in the planned path.
|
||||
* @param {MinecraftBot} bot, reference to the minecraft bot.
|
||||
* @param {number} x, the x coordinate to navigate to. If null, the bot's current x coordinate will be used.
|
||||
* @param {number} y, the y coordinate to navigate to. If null, the bot's current y coordinate will be used.
|
||||
|
@ -1103,6 +1104,7 @@ export async function goToPosition(bot, x, y, z, min_distance=2) {
|
|||
* @example
|
||||
* let position = world.world.getNearestBlock(bot, "oak_log", 64).position;
|
||||
* await skills.goToPosition(bot, position.x, position.y, position.x + 20);
|
||||
* // The bot will automatically open any doors it encounters on the way
|
||||
**/
|
||||
if (x == null || y == null || z == null) {
|
||||
log(bot, `Missing coordinates, given x:${x} y:${y} z:${z}`);
|
||||
|
|
Loading…
Add table
Reference in a new issue