
A minecraft mod which aims to add a "second player" into the game which will actually be intelligent.
This project so far is the result of thousands of hours of endless reasearch, trials and errors, and just the simple goal of eliminating loneliness from minecraft as much as possible.
If you liked my work, please consider donating so that I can continue to work on this project in peace and can actually prove to my parents that my work is making a difference. (Also not having to ask for pocket money from mom).
Just know that I won't ever give up on this project.
Buy me a coffee
https://buymeacoffee.com/shasankp000
Paypal
Since the new semester in my college has started this month, I am gonna be under really heavy pressure, since I have to study 11 subjects in total (Machine learning, Linear Algebra, Physics, CyberSecurity, and a lot more lol). Don't worry though I won't stop working on this project, it's just that the updates will be quite slower.
It's understandable if y'all leave by then or give up on this project, so, I won't mind. :))
Thank you all from the core of my heart for the support so far. I never imagined we would come this far.
Latest Update: 21/8/2025 at 04:08 AM IST (Indian Standard Time)
Please have patience while waiting for updates. Since I am the only guy working on this project, it does take me time to address all the issues/add in new features.
Important: Earlier proposed second part features will be added in the next patch and this new update marks the end of support for 1.20.6 and below.
Thanks to https://github.com/arichornlover AI Player has now been updated to version 1.21.1
This minor update of AI player updates the mod to version 1.21.1 and also brings support for other custom API providers.
This feature allows you to use alternative AI providers that are compatible with the OpenAI API standard, such as OpenRouter, TogetherAI, Perplexity, and others.
Set the system property(JVM argument) when launching the game:
-Daiplayer.llmMode=custom
/configMan) and then click the API Keys button.https://openrouter.ai/api/v1)/configMan again and you should see the list of models available.embedddinggemma model from nomic-embed-textThe system will automatically fetch available models from your provider's /models endpoint and display them in the model selection interface.
Any provider that implements the OpenAI API standard should work. Some examples:
https://openrouter.ai/api/v1https://api.together.xyz/v1https://api.perplexity.ai/https://api.groq.com/openai/v1http://localhost:1234/v1The custom provider implementation uses the following OpenAI API endpoints:
GET /models - For fetching available modelsPOST /chat/completions - For sending chat completion requestsYour provider must support these endpoints with the same request/response format as OpenAI's API.
I realized that many of the commitments made in the previous announcement were too ambitious to implement in a single update. To keep development smooth, this release is the first part of a two-part update.
This update focuses on core system rewrites and better AI decision-making, laying the foundation for the next wave of features.
Also support for versions below 1.20.6 has been dropped due to codebase changes that I simply can't handle migrating by myself. However others are free to port to lower versions.
Upcoming second part will have the update in 1.20.6 as the final update for 1.20.6 and also will have a new update to directly 1.21.6 where hence the future versions will continue onwards.
AI Player now supports multiple LLM providers (configurable via API keys):
If you select the Gemini Search as the web search tool for the LLM, it will use the API key you have set as your LLM provider in the settings.json5 file automatically.
For https://serper.dev/ search, get an api key from serper.dev and then navigate to the config folder in game, open the ai_search_config.json and put the key:

(Note: I couldn’t test all of these myself except the Gemini API since API keys are costly, but the integrations are ready.)

Here’s what’s planned for the next patch:
Combat & Survival Enhancements
Improved Path Tracer
Self-Goal Assignment System
Mood System (design phase)
Player2 Integration
Ever felt lonely while playing minecraft alone during that two-week phase? Well, this mod aims to solve that problem of loneliness, not just catering to this particular use case, but even (hopefully in the future) to play in multiplayer servers as well.
And the best part? You can run completely offline language models based on your computer's specifications.
Please note that this is not some sort of a commercialised AI product. This project is just a solution to a problem many Minecraft players have faced and do continue to face.
This mod so far adds in a second spawnable player(or bot) via the carpet mod, and you can talk to it through a large language model via ollama completely offline on your pc and so far I have integrated reinforcement learning for the bot to interact and learn from it's environment in the context of "reflex actions".
Goal based learning will be added soon in upcoming updates.
This mod also relies on the owo-lib mod for configuration handling.
This mod relies on the internal code of the Carpet mod, please star the repository of the mod: https://github.com/gnembon/fabric-carpet (Giving credit where it's due)
This mod also relies on the ollama4j project. https://github.com/amithkoujalgi/ollama4j
Requires Fabric api latest version.
Requires Carpet mod version as stated in the dependency section
https://streamable.com/imko3x?src=player-page-share
better and faster reflex actions, reduced training time.
Youtube tutorial soon
This project requires Java 21 to run.
Download Java 21 from BellSoft JDK 21 LTS.
On Windows: click Download MSI and complete installation.
On Linux: install via your package manager, e.g.
sudo apt install openjdk-21-jdk
Go to
Download based on your operating system.
After installation, run ollama from your desktop. This will launch the ollama server.
This can be accessed in your system tray
Open your command line (CMD/Terminal) and run:
ollama pull nomic-embed-text # Embedding model (required)
ollama pull qwen3:8b # Preferred language model (used in testing)
For previous users:
ollama rm gemma2 # Remove old model if installed
ollama rm llama2 # Remove old model if installed
ollama rm llama3.2 # Remove old model if installed
If you’ve run the mod before, delete old config:
.minecraft/config/settings.json5
✅ Make sure the Ollama server is running before starting the game.
Ensure that all required dependencies (including Carpet mod) are installed.
Before launching the game, you must provide the following JVM argument:
-Daiplayer.llmMode=<provider>
Local Ollama (default):
-Daiplayer.llmMode=ollama
OpenAI:
-Daiplayer.llmMode=openai
Anthropic Claude:
-Daiplayer.llmMode=claude
Google Gemini:
-Daiplayer.llmMode=gemini
xAI Grok:
-Daiplayer.llmMode=grok
Inside the Config Manager, there is now a dedicated section for entering API keys for all supported providers.
⚠️ Note: Ollama must always be running since the embedding model (nomic-embed-text) is local and required.

/bot spawn <yourBotName> <training|play>
training → Spawns bot in training mode (does not connect to LLM).play → Normal mode with full AI features.If you select the Gemini Search as the web search tool for the LLM, it will use the API key you have set as your LLM provider in the settings.json5 file automatically.
For https://serper.dev/ search, get an api key from serper.dev and then navigate to the config folder in game, open the ai_search_config.json and put the key:

Main Command:
/bot
Example Usage:
/bot spawn Steve training
The updated syntax comes courtesy of Mr. Álvaro Carvalho.
Since the mod depends on Carpet, you can also spawn bots using Carpet’s commands.
If you’re playing in offline mode, it’s recommended to use the mod’s built-in spawn command instead.
Also remember that if you are using this mod, it's best to create a modpack for it's own as it will require you to run ollama server in the background every time you launch the game itself. Ollama server itself doesn't consume much memory so you should be fine.
Main command
/bot
Sub commands:
A lot of the commands have been changed since the last version. Please check changelog of the latest version.
Example Usage:
/bot spawn Steve training
The above command syntax changes credits go to Mr. Álvaro Carvalho
And yes since this mod relies on carpet mod, you can spawn a bot using carpet mod's commands too and try the mod. But if you happen to be playing in offline mode, then I recommend using the mod's in built spawn command.