STYGION Optimize Beta

What we fixed while chasing lag on our own server.

STYGION Optimize is a NeoForge 1.21.1 mod for big modpacks: the lag and crash fixes we wrote for STYGION MC, a busy Create Aeronautics server. Each fix changes how fast something is worked out, never what comes out, and each one has its own switch. It works on the server alone, on the client alone, or on both.

Before and after, on the same data.

Self tests on a development server from 30 October 2026 and on a copy of our live server on 10 November. Each runs the vanilla code and ours over the same data and checks the results match. What the guards did on the live server is in the crash case below.

  • 47 → 0

    full garbage collections during a two-minute flight over new terrain

    A world of about 115,000 light sections, the same flight twice. Allocation fell by 27 % and the light came out with the same checksum.

  • −96 %

    time spent checking advancements when an inventory slot changes

    20 × 2,665 slot changes: 1,478 to 1,615 ms in vanilla, 58 to 60 ms with the index. The same listeners fire, in the same order.

  • 42.6 → 1.7 ms

    on the main thread to save a player whose advancements did not change

    One player holding all 1,399 vanilla advancements, median of seven saves. With a change since the last save: 39 to 3.2 ms.

  • 85.4 → 2.9 ms

    for 11,520 pathfinding lookups, most of them in unloaded chunks

    Same blocks, fluids and block entities returned. Only matters where nothing else in the pack already does this.

  • 405 → 5.5 ms

    the longest the main thread waited during an Explorer's Compass structure search

    A copy of our live server with every mod, 10 November 2026. The same candidates in the same order, and the same structure found.

What it fixes

All of these are on from the start, and any of them goes off with one line.

Autosave
player data, statistics and advancements are written on one background thread, through a temporary file and a rename, so a crash never leaves half a file. A player who logs back in waits only for their own files.
Unchanged advancements
not written again when nothing changed since the last save.
Light maps
after every batch of light changes the game copies the whole map so other threads can read it. Our copy shares every part that did not change: kilobytes instead of megabytes, and the light stays exactly the same.
Advancement checks
a changed slot tests only the "inventory changed" criteria that can match the changed item, in vanilla's order. A big pack has thousands of them.
Natural spawning
where the biome cannot change, it is read straight away instead of being blended again. Same mob, same random numbers.
Pathfinding
one empty chunk reused for every lookup in an unloaded chunk, instead of a new one each time.
Fire and lava
the check after every move is skipped when it cannot change anything.
Blocks of removed mods
load as the vanilla block you choose instead of air plus an error for every palette entry.
Impossible moves
a move that is not a number or longer than 1,024 blocks in one tick is dropped before collision runs. One such move made a server collide chunk by chunk across millions of blocks until the watchdog killed it.
Quieter logs
drops the INFO lines of mods that log every action they hook (by default one that wrote a line for every gun shot). Warnings and errors still come through.
A line per autosave
with the time it cost the main thread, so you can see the difference instead of trusting us.

Fixes for other people's mods

We found these while profiling. The mods are fine work; these are timing cases that only show up on a big, busy server. Each part does nothing when its mod is not installed.

Carry On
players were sometimes disconnected ("Failed to encode packet") when somebody came into view. The packet now takes its own copy of the carry data.
Sable on the server
a block changing at the edge of the loaded world no longer makes Sable load or generate the next chunk on the main thread. The physics update waits for the chunk instead.
Sable on the client
when a ship grows, only the sections you changed yourself are rebuilt at once; the rest is built in the background.
Sable storage
the disk sync of ship files runs on the background thread instead of stalling the save.
ParCool x Sable
its method lookups on every ParCool action are remembered instead of throwing an exception each time.
NTGL
its scan of every synced entity flag is skipped in ticks where no flag changed.
Sable teleports
a bed, respawn anchor or waystone on a ship used to put a player into the ship's storage far outside the world, and the next step crashed the server. The teleport now lands where that block of the ship is right now.
Better Chunk Loading
a player leaving while one of their chunks was already unloaded no longer crashes the server.
Explorer's Compass
a structure search no longer makes the main thread wait for a far chunk to generate; the world generation threads do it.
Ad Astra
the oxygen and temperature of a level are kept instead of being worked out again for every ticking chunk.

If you made one of these mods and want something changed or removed, tell us on Discord and we will.

Tell us on Discord

Off until you turn them on

These change behaviour a little, so they wait for you to decide.

Sparser AI far away
mobs far from every player pick new goals less often, while still moving and despawning every tick. Anything with a target, hurt, named, tamed, leashed, riding, on a ship, a raider or a boss thinks every tick. Distances and an exclude list are yours.
Players don't hold up the server
a player whose chunk is not loaded yet (a fast ship into new terrain, a teleport) pauses only their own tick until it arrives, as vanilla does for spectators.
Farm mobs without a brain
a mob from a spawner a player placed keeps its body (gravity, water, knockback, damage, drops) but does not think, so a fast mob farm costs only the physics of its mobs. Dungeon spawners stay dangerous.

Switch any of it off

Every fix has its own line in the config. The file reloads while the server runs, so you can compare before and after in one session, and the log lists what is on when it loads.

Every switch of STYGION Optimize 0.4.0 in config/stygion_optimize-common.toml, grouped as autosave, tick, mobs, client and fixes; the ones off by default are marked.
Config file config/stygion_optimize-common.toml

17 crashes in six days, fixed at the source.

Most of the guards above come from one week on our own server: the watchdog killing a frozen main thread, a player who could not log in without taking the server down. From the crash reports to the fix, the whole case is on our custom work page.

Questions people ask

Is it free?

Yes, on any server and in any modpack CurseForge lets you publish. The code is All Rights Reserved.

Does it have to be on the client too?

No. The server fixes work with the mod on the server only. The client fix (a growing Sable ship) needs it on the client, and single-player gets everything.

Does it change how the game plays?

The fixes that are on from the start give the same results as vanilla, only sooner; the guards only drop moves no player can make. The ones that change behaviour a little are off until you switch them on.

Does it send anything anywhere?

No. No network connections, no telemetry, no update check. It reads and writes the files Minecraft already uses, and its two config files.

Do I need Carry On, Sable or the others?

No. Their parts sleep when they are not installed. Supported when present: Carry On 2.2+, NTGL 3.2+, Sable 2.0+, ParCool x Sable 1.2, Better Chunk Loading 5.4, Explorer's Compass and Ad Astra.

Where does it run?

On STYGION MC, our Create Aeronautics server, where every fix here was found. The server runs the newest build.

Come and argue with us

Everything we make gets argued about in one Discord. Ideas, bugs and the occasional very long message about JVM flags.