AI Player
About the Modification
Have you ever felt lonely while playing Minecraft? This mod aims to solve this problem by adding an intelligent companion to the game that you can interact and communicate with.
The main advantage is that you can use local language models that work completely offline, depending on your computer's capabilities.
It's important to note that this is not a commercial AI product, but a solution to a problem many Minecraft players face.
What This Mod Does
The mod adds a second player-bot to the game that can be created through Carpet mod. You can communicate with this bot using large language models via Ollama completely offline. Reinforcement learning is also integrated, allowing the bot to interact with the environment and perform reflex actions.
Goal-based learning is planned for future updates.
Installation Requirements
For the mod to work, you need:
- Latest version of Fabric API
- Carpet mod version specified in the dependencies section
- Java 21
- Ollama for local models
Demonstration Videos
Overview of the mod in action:
Additional video demonstrating capabilities:
https://streamable.com/imko3x?src=player-page-share
Installation and Setup Guide
Step 1: Install Java 21
The project requires Java 21 to work:
- Download Java 21 from the official website
- On Windows: install the MSI package
- On Linux: use the package manager, for example:
sudo apt install openjdk-21-jdk
Step 2: Install Ollama
Go to https://ollama.com/ and download the version for your operating system. After installation, run Ollama - the server will run in the system tray.
Step 3: Configure Ollama Models
Open the command line and execute:
ollama pull nomic-embed-text # Embedding model (required)
ollama pull qwen3:8b # Preferred language model
Step 4: Configure JVM Arguments
Before starting the game, add the JVM argument:
-Daiplayer.llmMode=<provider>
Examples:
- Local Ollama:
-Daiplayer.llmMode=ollama - OpenAI:
-Daiplayer.llmMode=openai - Google Gemini:
-Daiplayer.llmMode=gemini
Step 5: Launch the Game
After starting Minecraft, use the command to create a bot:
/bot spawn <botName> <training|play>
training— training mode (without LLM connection)play— normal mode with full AI capabilities
Key Features of Version 1.0.5.2
Custom OpenAI Provider Support
Now you can use alternative AI providers compatible with the OpenAI API standard, such as OpenRouter, TogetherAI, Perplexity, and others.
How to Use Custom Providers
- Set the system property:
-Daiplayer.llmMode=custom - Delete the existing settings.json5 file in the config folder
- Open the API key configuration screen in the game (
/configMan) - Set the base URL and API key of your provider
- Save settings and refresh the model list
Supported Providers
- OpenRouter:
https://openrouter.ai/api/v1 - TogetherAI:
https://api.together.xyz/v1 - Perplexity:
https://api.perplexity.ai/ - Groq:
https://api.groq.com/openai/v1 - Local LM Studio:
http://localhost:1234/v1
New Features in Version 1.0.5.1
Updated NLP System
Completely redesigned natural language processing system - no more "I didn't understand you" messages. This is an experimental system that continues to be improved.
RAG System with Web Search
New retrieval-augmented generation system integrated with database and web search. Now AI provides accurate information about Minecraft, significantly reducing errors.
Task Chaining System
Added a system for breaking down complex instructions into sequences of simple tasks. You give a high-level command → the bot automatically breaks it down into smaller tasks → executes step by step.
Supported Tasks:
- Moving to a location
- Mining resources at a specified location
- Detecting nearby blocks and entities
- Reporting statistics (health, oxygen, hunger, etc.)
Bug Fixes
- Fixed issue with reading JVM arguments
- Removed dependency on owo-lib, now uses own configuration system
- Fixed issues with saving API keys
- Added new launcher detection system
- Updated Config Manager interface with search and responsive design
Future Plans
- Combat and Survival Enhancements: Bot will use weapons to defend against mobs
- Improved Navigation System: Smart movement through water and complex terrain
- Self-Goal Assignment System: Bot will set goals for itself like a real player
- Mood System: Adding emotional context and varied behavior
- Player2 Integration: One of the most anticipated features
Important Notes
- It's recommended to create a separate modpack for this mod, as Ollama must run in the background
- Ollama consumes minimal memory and shouldn't significantly affect performance
- The nomic-embed-text embedding model is always required for operation