look-at
Direct the bot to focus on specific coordinates in Minecraft using X, Y, and Z values. Enables precise interaction and navigation within the game environment.
Instructions
Make the bot look at a specific position
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate | |
| y | Yes | Y coordinate | |
| z | Yes | Z coordinate |
Implementation Reference
- src/tools/position-tools.ts:52-56 (handler)The handler function for the 'look-at' tool. It retrieves the bot instance and uses bot.lookAt to make the bot face the specified coordinates (x, y, z). Returns a response confirming the action.async ({ x, y, z }) => { const bot = getBot(); await bot.lookAt(new Vec3(x, y, z), true); return factory.createResponse(`Looking at position (${x}, ${y}, ${z})`); }
- src/tools/position-tools.ts:47-51 (schema)Zod schema defining the input parameters for the 'look-at' tool: x, y, z coordinates as numbers.{ x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), },
- src/tools/position-tools.ts:44-57 (registration)Registration of the 'look-at' tool using factory.registerTool, including name, description, schema, and inline handler.factory.registerTool( "look-at", "Make the bot look at a specific position", { x: z.number().describe("X coordinate"), y: z.number().describe("Y coordinate"), z: z.number().describe("Z coordinate"), }, async ({ x, y, z }) => { const bot = getBot(); await bot.lookAt(new Vec3(x, y, z), true); return factory.createResponse(`Looking at position (${x}, ${y}, ${z})`); } );