detect-gamemode
Identify the current game mode in Minecraft to determine available actions and gameplay rules for character control.
Instructions
Detect the gamemode on game
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/gamestate-tools.ts:9-12 (handler)The handler function for the 'detect-gamemode' tool. It retrieves the current bot's gamemode from `bot.game.gameMode` and returns a formatted response using `factory.createResponse`.async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); }
- src/tools/gamestate-tools.ts:5-13 (registration)The registration of the 'detect-gamemode' tool using `factory.registerTool`, including name, description, empty input schema, and inline handler.factory.registerTool( "detect-gamemode", "Detect the gamemode on game", {}, async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); } );
- src/main.ts:57-57 (registration)Invocation of `registerGameStateTools` in the main application, which registers the 'detect-gamemode' tool among others.registerGameStateTools(factory, getBot);