Inspiration

Minecraft enemies are usually predictable. Once players understand how a mob attacks, they can repeat the same strategy forever.

We wanted to build something different: an enemy that does not just become stronger, but actually learns how the player behaves.

That idea became Nemesis AI — a hostile Minecraft entity that observes combat habits, changes tactics, remembers repeated movement routes, prepares ambushes, and even reproduces through a parasite lifecycle.

Our goal was to make encounters feel less scripted and more personal. The same strategy should not work forever.

What it does

Nemesis AI adds a custom adaptive enemy to Minecraft Java Edition 1.21.1.

The Nemesis can:

  • observe player combat behavior
  • detect repeated habits
  • dynamically change combat tactics
  • remember learned behavior
  • track repeated movement routes
  • predict where the player is going
  • move ahead of the player and prepare ambushes
  • reproduce by infecting passive animals
  • spawn a Baby Nemesis that hunts and grows into an adult
  • communicate adaptations through HUD messages

Adaptive combat

Nemesis can switch between several combat behaviors depending on the situation and learned player habits.

Examples include:

  • Normal combat — standard pursuit and melee attacks
  • Fast Chase — increased speed against players who repeatedly run away
  • Delayed Attack — changes melee timing to make predictable blocking less effective
  • Zigzag Approach — approaches while moving laterally instead of running in a straight line
  • Ranged Attack — attacks the player from a distance

Instead of giving the mob only one fixed combat pattern, the learning system can influence which tactic it uses.

Predictive ambushes

Nemesis can also learn how the player moves through the world.

At close range it behaves like a normal hostile enemy and actively pursues the player. At longer distances it can enter an observation mode.

While observing, it periodically records meaningful player movement and divides traveled space into route regions. When the player repeatedly travels through the same area, Nemesis begins treating that route as a learned pattern.

It can then estimate the player's direction, select a position ahead of the route, travel there first, and wait.

Instead of always chasing the player from behind, Nemesis can appear where it expects the player to go next.

The learned route information and ambush state can persist between world sessions.

Parasite lifecycle

Nemesis also has a reproduction system inspired by parasitic creatures.

An adult Nemesis can infect:

  • cows
  • horses
  • pigs
  • sheep
  • chickens

After a parasite bite, the animal remains alive during an incubation period of approximately 15 seconds.

When incubation finishes, a Baby Nemesis emerges and the host dies.

The Baby Nemesis is smaller, has its own visual appearance, and aggressively hunts both players and supported animals.

After consuming enough animals, it grows into the existing adult Nemesis entity.

The new adult can then infect another animal, creating a repeatable lifecycle:

Adult → Infection → Incubation → Baby → Feeding → Adult

How we built it

Nemesis AI was built as a Fabric mod for Minecraft Java Edition 1.21.1 using Java 21.

The project uses:

  • Fabric Loader
  • Fabric API
  • Gradle
  • official Mojang mappings
  • GeckoLib for entity rendering and animation
  • Git and GitHub
  • GitHub Actions
  • Agent Orchestrator
  • OpenAI Codex

We divided the project into several systems so that the team could work in parallel.

One part focused on the learning engine and player behavior analysis. Another focused on the Nemesis entity, combat behavior, movement, and parasite lifecycle. Another focused on HUD feedback, route learning, ambush behavior, testing, and presentation.

We used Agent Orchestrator to coordinate development work and delegate focused implementation tasks to agents. This helped us work on separate systems in parallel while keeping the project integrated through Git branches and pull requests.

Challenges we faced

One of our biggest challenges was integrating independently developed systems into the same Minecraft entity.

Combat AI, learning, animation, networking, persistence, route tracking, and parasite behavior all interact with the same game state, so a change in one area could easily break another.

We also encountered compatibility problems during development. Some early entity code used Yarn-style Minecraft mappings while the repository had moved to official Mojang mappings. This caused large compile failures and required converting the entity and AI code to the correct API names.

Multiplayer and server-side behavior were another challenge. Features such as infection timers, Baby Nemesis spawning, learning state, and entity synchronization must behave correctly on the server to avoid duplicate entities or inconsistent state between players.

Persistence also required careful handling. Route memory, ambush state, parasite infection timers, and Baby Nemesis growth need to survive world saves without different entities interfering with each other.

Finally, balancing an adaptive enemy is difficult. There is a fine line between making Nemesis feel intelligent and making it feel unfair. We wanted its behavior to be understandable enough that players can recognize what it learned, while still making repeated strategies less reliable.

What we learned

This project taught us much more than simply how to create a custom Minecraft mob.

We learned how to:

  • build and structure a Fabric mod
  • work with Minecraft entity AI and pathfinding
  • create custom combat goals
  • synchronize gameplay state between server and client
  • persist entity and AI state
  • integrate GeckoLib models and animations
  • design behavior-learning systems
  • implement route prediction and ambush logic
  • coordinate multiple independently developed modules
  • resolve Git merge conflicts between parallel feature branches
  • use CI builds to catch integration problems early
  • use Agent Orchestrator to manage parallel AI-assisted development

The most important lesson was that adaptive behavior does not require one enormous AI model. A combination of observation, memory, scoring, prediction, and specialized behaviors can already make an enemy feel much more reactive and personal.

What's next

The core systems are implemented, but there are many directions we would like to explore further:

  • improve combat balancing
  • expand the number of learnable player habits
  • add more Nemesis tactics
  • improve ambush prediction
  • add additional parasite host interactions
  • improve Baby Nemesis visuals and animations
  • expand multiplayer testing
  • add more player-facing explanations of what Nemesis has learned
  • create more polished encounters and progression around Nemesis

Our long-term goal would be to make Nemesis feel less like a single boss encounter and more like a persistent rival that develops alongside the player.

Built With

  • agent-orchestrator
  • chatgpt
  • claude
  • codex
  • fabric
Share this project:

Updates