LazyAI

Optimizes Minecraft mob AI by scaling calculations based on distance to players, improving performance with as minimal gameplay impact as possible

62,11k

LazyAI

Overview

Lazy AI dynamically reduces the frequency and precision of mob AI calculations based on their distance from players. Mobs close to players behave normally, while those farther away update their goals, pathfinding, and other goals less often. This ensures smoother performance, especially in mob-heavy worlds.

**Lazy AI bases its distance calculations of the simulation distance * *distance scaling* of your game**

Performance difference

Lower ms -> better

Vanilla performance

<img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/MC_performance_Vanilla.png?raw=true" alt="Vanilla performance" width="500"/>

Lazy AI performance

Using AI Optimization Type 'Dynamic' will dynamically switch between the three optimization modes based on TPS | Minimal | Moderate | Agressive | | ------------- | ------------- | ------------- | | <img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/MC_performance_Minimal.png?raw=true" alt="Lazy AI performance (using AIOptimizationType = Minimal)" width="600"/> | <img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/MC_performance_Default.png?raw=true" alt="Lazy AI performance (using AIOptimizationType = Moderate)" width="600"/> | <img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/MC_performance_Aggressive.png?raw=true" alt="Lazy AI performance (using AIOptimizationType = Aggressive)" width="600"/> |

Comparison of Vanilla and LazyAI

TPS comparison in a mob crowded test world

<img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/sideview/LazyAI_Compare01_notitle.png?raw=true" alt="Average world TPS test image" width="700"/>

TPS comparison in a giant villager trading hall

<img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/sideview/LazyAI_Compare02_notitle.png?raw=true" alt="Villager trading hall test image" width="700"/>

Features

- Server-wide improvement | *Reduces AI updates for mobs that are far from players* - Server-wide improvement | *Simplifies A** *path calculations at long distances* - Server-wide improvement | *Look, wander, and tempt goals run less often when distant* - Server-wide improvement | *Easily balance performance and gameplay through a simple config accessible through Server-wide improvement* - Server-wide improvement | *Decreases tick load even on servers*

Settings

- Enable Vanilla Mob Ticking (Previously: Never Slow Down Distant Mobs) | *This settings controls how aggressive the optimizations should be* - Enable Vanilla Mob Ticking (Previously: Never Slow Down Distant Mobs) | *This setting controls what % range of your simulation distance is considered close and far range* - Enable Vanilla Mob Ticking (Previously: Never Slow Down Distant Mobs) | *This setting controls how much delay animals have to being tempted by an item* - Enable Vanilla Mob Ticking (Previously: Never Slow Down Distant Mobs) | *This setting controls the prevention of zombies wanting to destroy turtle eggs* - Enable Vanilla Mob Ticking (Previously: Never Slow Down Distant Mobs) | *This setting controls if distant mobs should tick the same as in a unmodded (vanilla) game. Enabling this reduces the mod's TPS-boosting effect on your game, but can fix mob ticking issues.*

<img src="https://github.com/PixelIndieDev/LazyAI/blob/main/documentation/previewImages/MC_LazyAI_settings.png?raw=true" alt="Lazy AI settings menu" width="900"/>

FAQ

Can this mod increase my TPS?

Yes, this mod can improve your TPS.

Can this mod increase my FPS?

No, this mod cannot improve your FPS.

Does this mod affect mob farms?

Short awnser: Yes, but only a little bit.

Long awnser: Yes, LazyAI does affect mob farm efficiency, but the throughput impact is minimal. In testing with my iron golem farm, vanilla Minecraft yielded 1023 iron ingots, while with the LazyAI on the aggressive setting yielded 979 iron ingots. That's a difference of ~4.5%.

A few things worth noting: - This was tested on the aggressive setting, which has the most impact. Using a less aggressive setting will reduce that gap further. - A ~4.5% decrease is unlikely to be noticeable in normal gameplay. - Results may vary depending on farm design and server performance. - The testing were done on LazyAI version 1.6.0.

In practice, you won't notice the mob farm efficiency decrease.

What modloader do I need?

You need Fabric

I installed the mod, but didn't see as much difference?

The preview images are taken in a stress test situation. It can also be because your simulation distance or this mods *distance scaling* is set too high for your use case.

Where is the config located?

.minecraft/config/lazy-ai.json

Can this mod be used on a server?

Yes, you can use this mod on a server. The mod works on both the server and the client. Vanilla clients can join a server using LazyAI.

Can this mod be used on a client?

Yes, you can use this mod on a client. The mod works on both the server and the client. Clients with LazyAI can join servers without LazyAI.

ADS