CurseForge · Minecraft mod
cityopt
Reduces the tick cost of crowded NPC towns on Forge 1.20.1: distance-bucket AI throttling, a pathfinding cooldown, a region MSPT watchdog with hysteresis, async line-of-sight culling, and one-command diagnostics. No entities deleted, no critical AI frozen.
Quick answer
Which cityopt release should I use?
cityopt-0.1.1.jar targets 1.20.1 with Forge. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.
Where it goes
Is cityopt required on the client, server, or both?
The project page does not say whether this file belongs on the client, dedicated server, or both.
The source does not explicitly classify this release as client-only or server-only.
What else does cityopt-0.1.1.jar need?
cityopt-0.1.1.jar. Change the file and its required mods may change too.
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 cityopt without breaking your instance.
Built for cityopt-0.1.1.jar. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use cityopt-0.1.1.jar. It targets 1.20.1 with Forge; another release may have different loader, side or dependency requirements.
- 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.
- 03
Put it on the correct side
The project page does not say whether this file belongs on the client, dedicated server, or both.
- 04
Pick the file you checked
Use the “Get this file” button beside cityopt-0.1.1.jar. It opens that exact file at the source.
About this project
What does cityopt add?
CityOpt
Lighter towns. Same NPCs.
CityOpt is a small, config-driven optimisation mod for Minecraft 1.20.1 / Forge 47.x aimed at one specific problem: a town full of NPCs. Dozens of them standing around, all running their brains, their pathfinding, their schedules — every single tick — while the client is already busy streaming distant chunks for a long view distance.
It does not delete entities. It does not freeze combat AI. It just stops paying full price for things nobody is looking at.
What it actually changes
Server — distance based AI throttling
Every living entity is sorted into a distance bucket relative to the nearest player, and its AI step runs on a per-bucket interval instead of every tick.
Two details make this survivable rather than a stutter generator:
* **Phase spreading.** The interval is offset by the entity id, so 300 far-away NPCs do not all wake up on the same tick. The cost is smeared across the whole interval instead of spiking once every four ticks.
* **Locomotion keeps running.** When the AI step is skipped, the movement and jump controllers are still ticked, so nothing snaps or jitters in place. Brains, goal selectors, look control and schedules are what get deferred.
Server — pathfinding cooldown
A new path is not recomputed more often than every **100 ticks** (configurable) per entity. If a recompute is requested during the cooldown, the entity keeps following its existing path instead. If it has no path at all, the request is always allowed — CityOpt never freezes a mob by refusing to give it a path.
Server — region MSPT watchdog
Entity AI cost is attributed to **128×128 block regions** and tracked with a rolling average. When a region's AI time and the global tick time both go up, that region's throttle penalty escalates by one step (interval ×2, up to ×4).
It is deliberately hard to make it flap:
* escalation needs **3 consecutive 20-tick windows** above the high-water mark (default 45 ms)
* after every change there is a **10-window cooldown**
* stepping back down needs **30 consecutive windows** below 70 % of the high-water mark
* regions that have not been sampled for 30 windows are dropped from the map
Server — dropping items and block entities
* Dropped items of the same type within 2 blocks are merged once every 20 ticks (respects max stack size, keeps the younger stack's despawn timer).
* Block entity ticking can be gated down to once per second — **off by default**, and it only ever affects types you explicitly whitelist. Any player within 32 blocks keeps the full tick rate.
Client — asynchronous visibility culling
For servers where the client is the bottleneck, CityOpt adds a conservative line-of-sight cull on top of what EntityCulling already does:
* a candidate snapshot is collected on the main thread every 2 ticks
* one worker thread (CityOpt-Visibility) casts **3 rays** per candidate through a per-section opacity bitmap
* results come back through a ConcurrentLinkedQueue and are drained at the end of the tick
* an entity is only hidden after **2 confirmed occlusions**; results expire after 300 ms, entities farther than 48 blocks (configurable) are skipped
The safety rules are not negotiable: section bitmaps are only ever built on the main thread (512 bytes each), the worker **never** calls getBlockState, and a section it cannot read means "do not cull". Named, glowing, recently hurt, taller than 3 blocks, vehicles, passengers and anything closer than 8 blocks is always rendered. If the culling code throws for any reason, it disables itself and tells you in the log — it will never take a frame down with it.
Client — town prewarm
When the player walks into a dense area (default: 40+ living entities within 32 blocks for three consecutive checks), CityOpt smoothly lowers entityDistanceScaling to 75 % and restores it 3 seconds after leaving. If you touch the slider yourself, it gives up permanently and never touches the setting again.
Configuration
Two files are generated on first launch:
* config/cityopt-common.toml — server side (works on a dedicated server, no client install needed)
* config/cityopt-client.toml — client side (culling, prewarm, overlay)
Every optimisation has its own boolean. The defaults are intentionally timid: Brain throttling is off, block-entity gating is off with an empty whitelist, and the client only culls at short range. Turn things on one at a time and watch /cityopt stats.
Compatibility
| Mod | What happens |
|---|---|
| **Voxy** | Nothing is shared. CityOpt only touches the entity layer; Voxy's chunk LOD pipeline is never modified. When Voxy is detected it logs a suggestion to lower sectionRenderDistance and **never writes voxy-config.json**. |
| **EntityCulling** | Fully compatible. With yieldToEntityCulling (default: true) CityOpt stops casting rays entirely and only keeps its distance gate, so the two mods never cull the same entity twice. |
| **Embeddium / Oculus** | No renderer mixins, no LevelRenderer hooks — nothing to collide with. |
| **ModernFix** | Independent. Neither mod needs the other to be disabled. |
| **spark** | Complementary. /cityopt stats gives counters, spark gives the call tree. |
Project description from CurseForge.
Pick your setup
cityopt by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
cityopt versions and loaders
cityopt-0.1.1.jar
22 Nov 2026
Looking for an older file? The official CurseForge project page is in Resources.