What is Player 2 AI NPC?
Player 2 AI NPC is the name most players use for Player2NPC, a Minecraft mod by the developer Goodbird that lets you summon AI companions you talk to in ordinary chat, and who then go and do what you asked. An NPC, or non-player character, is any character the game controls rather than a human. What makes this one interesting is that you do not pick from a dialogue menu: you type “can you grab me some wood?” and the companion walks off, chops trees and fills its inventory.
According to the Player2NPC repository on GitHub, the mod was built for the Player2 AI Game Jam as a showcase of a framework called PlayerEngine. The “thinking” comes from the Player2 API, which runs a large language model (LLM, the same kind of AI behind chat assistants) to interpret your message. The “doing” comes from PlayerEngine, which gives an ordinary mob the abilities of a player: an inventory, block breaking and placing, item use and pathfinding.
That split matters, and it is the reason the Player 2 AI NPC mod gets attention. Game AI has traditionally meant hand-built systems. The Wikipedia overview of artificial intelligence in video games describes how most NPC behaviour has historically been scripted patterns and finite-state machines (a set of modes such as “chase” and “flee” with rules for switching between them), from Pac-Man’s ghosts with their distinct personalities to strategy-game units. Player2NPC keeps that dependable game logic and puts a language model on top of it as the decision-maker.
How the Player2NPC mod works under the hood
You do not need to read Java to understand the design, but it helps to know the moving parts, because the same structure is how you would build an AI NPC in any engine.
The body: a mob that behaves like a player
The companion is a custom entity that implements a handful of PlayerEngine interfaces. One marks it as a controllable agent, one grants a persistent player-style inventory, one lets it break and place blocks and use items, and one adds a hunger system. Those abilities are attached as modular components using a library called Cardinal Components, so a modder can make their own mob player-like by registering the same components on their entity class.
The legs: pathfinding
Movement and navigation come from Automatone, a version of the Baritone pathfinding system. Pathfinding is the code that works out a route from A to B around obstacles. Because of that, the companion does not teleport to a tree: it walks there like a player would.
The brain: the language-to-action loop
When you type a message, the repository describes a loop that looks like this:
- You write something in chat, for example “hey, can you get me some logs?”
- The Player2 API (the LLM) turns that into a short command, such as
get oak_log 10. - A controller called AltoClefController receives the command.
- Its task system creates the matching task, in this case a mine-and-collect task.
- The entity carries the task out in the world, guided by the pathfinder.
The key design choice: the LLM never moves the character directly. It only produces a goal. Deterministic code (code that gives the same result every time for the same input) decides how to reach that goal. The project calls this layer a guardrail, and it is why the companion does not glitch through walls or invent items it does not have.
One more detail worth knowing for servers: the companions are independent server-side entities, not bots running on separate copies of the game client. That keeps them lighter and easier to manage on a multiplayer world.

How to install and use Player 2 AI NPC in Minecraft
The repository describes how to use the mod once it is running; it does not lay out a full install walkthrough. Here is what you can count on, and what to check.
What you need
- Minecraft: Java Edition. Player2NPC is written in Java and built with Gradle, the standard setup for Java Edition mods. Install the Minecraft version and mod loader that the project’s releases specify, then place the mod file in your mods folder.
- Access to the Player2 API. The companions’ understanding of your messages comes from Player2, so Player2 needs to be set up alongside the mod. Without it, the body still exists but nothing is thinking.
Using it in game
- Press H to open the character selection menu.
- Pick a companion; each has its own personality and appearance.
- Summon it, then talk to it in chat in plain language.
- Give it jobs: gather a set number of a resource, deal with a nearby mob, or stay by your side.
Bedrock, Pocket Edition and APK files
Bedrock Edition, including the mobile version long known as Pocket Edition, uses a different add-on system from Java Edition, so a Java mod like this one will not load there. The repository does not offer an Android build either. If you find an APK file advertising itself as Player 2 AI NPC, be cautious: unofficial installers are a classic malware route. Stick to the developer’s repository or the official Player2 platform.
Player2 also hosts AI mods for other games beyond Minecraft. If you are after AI companions in a different title, check its current catalogue rather than trusting reposted downloads.
Player 2 AI NPC compared with traditional NPC AI
It helps to see where an LLM-driven companion fits next to the two other common approaches: classic scripted AI, and a “chatbot in a box” NPC that can talk but cannot act.
| Scripted NPC AI (state machines, behaviour trees) | Chatbot-only NPC | LLM plus action layer (Player 2 AI NPC style) | |
|---|---|---|---|
| Understands free-text requests | No, only menu choices or triggers | Yes | Yes |
| Changes the game world | Yes, in pre-planned ways | No, it only replies | Yes, through approved actions |
| Predictability | High | Low: may promise things the game cannot do | Medium to high: the action layer enforces rules |
| Response speed | Instant | Waits on the model | Waits on the model for decisions, then runs at game speed |
| Running cost | None beyond your game | Model calls | Model calls |
| Effort to build | Grows with every behaviour | Low | Moderate: you write the actions once, the model chooses among them |
Language-model characters are not brand new. AI Dungeon is a text adventure where AI generates the story as you play. What the Player 2 AI NPC approach adds is a body: the model’s output drives real systems with real constraints, so the character participates in the game instead of narrating it.





