Back to mods
AI Improvements: Performance Tuning project artwork

Modrinth · Minecraft mod

AI Improvements: Performance Tuning

Performance improvements for vanilla AI, with the ability to turn off certain AI behaviors

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which AI Improvements: Performance Tuning release should I use?

Updated 5 months ago
Latest stable file 0.5.4
Game version 26.1, 26.1.1, 26.1.2
Loader NeoForge

AI Improvements: Performance Tuning 0.5.4 targets 26.1, 26.1.1, 26.1.2 with NeoForge. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.

Where it goes

Is AI Improvements: Performance Tuning required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does AI Improvements: Performance Tuning 0.5.4 need?

0.5.4. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add AI Improvements: Performance Tuning without breaking your instance.

Built for AI Improvements: Performance Tuning 0.5.4. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.5.4. It targets 26.1, 26.1.1, 26.1.2 with NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.5.4. It opens that exact file at the source.

About this project

What does AI Improvements: Performance Tuning add?

Note 1: If you have performance issues not covered feel free to make a request. 
Note 2: It is not expected this mod improves performance in all cases. Make sure to test your results to see if you require it.

About

Simplified AI modification mod focused on performance and low-level modifications to AIs in the game. Picking up the slack for the base game and improving it for a modded ecosystem. Handling common problems such as too many animals, performance hits from swarms of zombies, and simple remove tasks skipped by larger AI improvement mods.

Story

AI Improvements was born out of the need to improve server performance for large heavily modded servers. As any experienced server owner will know a server's CPU clock time is eaten away by mods all trying to fight over resources. Most server owners and developers will try to attack this problem by trimming mods. Rather than going after the mods installed I started to look at Minecraft itself. Focusing down on how it was designed to work and how it lent to performance problems.

I found that as a server's population grows so does the amount of entities and other resources. At first, I thought "lets reduce the spawn rate of mobs on the server" this lead to a complaint about mob farming. Even with testing, it didn't show a major solution to the problem. So rather than taking that approach, I decided to improve how the AI's function. This resulted in a lot of resource and insight into different areas. After many hours, I found my solution and created this mod. 

FAQ

I installed but didn't see a large gain as promised?
Newer versions of MC implement fixes for the AI. With the last few versions, the rotation fix was implemented in addition to other fixes. Thus, the impact of this mod is much lower than in older versions.

Can this be installed on the server only?
Yes, the mod is coded to function without it being client side

Can this be installed on the client only?
Yes, though it may not do much to improve fps. 

Where is the config?
.minecraft/config/bbm/AI_Improvements.cfg

What will happen if I disable the EntityLookHelper replacement?
You're not going to see much of an improvement in the AI code. However, if you enabled the other disable configs it should be fine.

How does this mod work for fixing performance?
It depends on the feature and version of Minecraft. Most of the performance comes from caching heavily calculated values. This has the result of reducing CPU time at the cost of an ignorable amount of RAM. See feature list for exacts...

Current Features:

Config to disable AI Watch Closest Entity

By default the config is set to false and will not do anything. When changed to true it will remove an AI segment called EntityAIWatchClosest. This AI segment handles the coded AIs use to rotate their head towards a nearby entity.Visually this will cause a few odd issues. However, for the CPU this frees up a lot of usage caused by entities. 

Config to disable AI look random, config is not enabled by default

By default the config is set to false and will not do anything. Setting the config to true will cause entities to no longer use the 'look idle' AI code. This can improve performance for servers will large populations. As almost every entity on the map will use this when not doing anything important. Visually this can cause the entities head to not rotate sometimes but mostly goes unnoticed.

Config to replace EntityLookHelper with a more efficient version, config is enabled by default

This is the main feature of the mod and can greatly improve CPU performance at a small cost to RAM. How this works is MC's look helper code is replaced with a custom version. The custom version stores some data that makes it faster to get the angle for a location. Threw some testing with VisualVM result have shown a 50% to 80% decrease in CPU usage by the AI code. For a server with 25 people on constantly this resulted in a gain from 5 to 7 tps. 

Project description from Modrinth.

Pick your setup

AI Improvements: Performance Tuning by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

35 available setups

Showing the newest 12 of 35 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

AI Improvements: Performance Tuning versions and loaders

19 of 19 releases match

Looking for an older file? The official Modrinth project page is in Resources.