This mod hooks Google Gemini 2.0 Flash into the Minecraft chat. The AI knows your current position, biome, health, weather, inventory (first 10 slots), game mode, and XP — so you can ask it context-specific questions. Per-player conversation history persists until you reset it with !clear.
Chat
The AI responds to every chat message you send. Answers support basic markdown formatting (bold, italic, code, headings, lists) and are automatically in German or English based on your input. The conversation history holds the last 10 messages per player — reset it with !clear to start fresh. Server-side only, no client mod required. Works in singleplayer too — the integrated server handles the API calls.
Cheat AI Mode
Enable enableCheatAI = true in the config to let the AI execute server commands from natural language requests.
Warning: Cheat AI gives the AI access to powerful server commands. Only enable in trusted environments.
| Command Type | Example | What executes |
|---|---|---|
| Give Items | "Give me 64 diamonds" | /give |
| Remove Items | "Remove my sword" | /clear |
| Clear Inventory | "Clear my inventory" | /clear |
| Kill Player | "Kill me" | /kill |
| Apply Effects | "Give me speed" | /effect give |
| Change Weather | "Make it sunny" | /weather |
| Set Time | "Make it day" | /time set |
| Any Command | "Spawn 10 zombies" | direct command ×N |
Multi-summon supports up to 50 entities at once. Relative coordinates (~) are supported in commands.
Commands
| Command | Description |
|---|---|
!clear |
Resets chat context — AI forgets the current conversation |
Configuration
config/sarosaichatmod-common.toml:
[api]
# Get your free key at aistudio.google.com
geminiApiKey = "YOUR_KEY_HERE"
geminiModel = "gemini-2.5-flash-lite"
[chat]
respondToTextMessages = true
[features]
# DANGEROUS: Allows AI to execute server commands
enableCheatAI = false
| Option | Default | Description |
|---|---|---|
geminiApiKey |
"" |
Your Google Gemini API key |
geminiModel |
"gemini-2.5-flash-lite" |
Model to use — gemini-2.5-flash-lite (1000 req/day free), gemini-2.5-flash (50 req/day), gemini-1.5-flash |
respondToTextMessages |
true |
Whether the AI responds to chat |
enableCheatAI |
false |
Enables command execution |
Setup
- Install Forge for Minecraft 1.20.1.
- Place the mod in the
modsfolder and start once to generate configs. - Visit aistudio.google.com and create a free API key.
- Enter the key in
config/sarosaichatmod-common.toml.
Note: This wiki serves as documentation. For active discussion, please join the Discord Server.