Limits and troubleshooting

Back to Zarith

Hard limits

Limit Value Where
Bodies per dimension 65,536, terrain section bodies included PhysicsSpace
Body pairs 65,536 PhysicsSpace
Contact constraints 32,768 PhysicsSpace
Speed of any body 120 m/s PhysicsSpace
Terrain mirrored around one body 96 blocks per axis PhysicsSpace
Blocks in /zarith physicify 4,096 (box up to 16,384) ZarithCommands
Blocks in /zarith assemble 32,768 (box up to 131,072) Contraptions
Rope length 0.5 to 64 blocks Contraptions
Cloth 16 by 16 tiles ZarithCommands
Structural check Groups up to 60,000 solid blocks BlockGroupEntity.maxStructureBlocks
Packet range Entities within 64 blocks of the sender ZarithNetwork
Settings arrays in packets 256 values each GroupVehicle.readSpawn
Wheels sent per vehicle 256 values (85 wheels) ZarithNetwork

The /zarith limits are only on the commands. From code you can build bigger groups, within the body and memory limits.

Performance

Things that cost the most, roughly in order:

Groups being still is what makes everything cheap: they sleep, stop sending poses, stop relighting, and start casting shade. Anything that keeps a group slightly awake (a controller calling activate() every tick, a force that never balances) costs a full step for that body every tick.

Problems

“Jolt physics is unavailable”

/zarith stats and the log say why. ZarithJolt logs Zarith: Jolt physics unavailable: <reason>.

Reason starts with Cause Fix
no Jolt native is bundled for os.name=... An OS or CPU with no native, such as 32 bit Windows or a RISC-V board. None; physics is not available there.
jolt-jni classes were loaded by ... Another mod probably bundles its own jolt-jni Another jar carries jolt-jni. Find the mod that bundles com.github.stephengold.joltjni and remove it, or have it depend on Zarith instead.
UnsatisfiedLinkError The native could not be loaded: a damaged file, or missing system libraries on Linux. Delete <game dir>/.zarith/natives/ and launch again. On Linux, check the C++ runtime is installed.
bundled native not found on the classpath A Zarith jar built without its natives. Use a release jar from buildAll, not a common jar.

The game will not start: split package or module conflict

Forge and NeoForge refuse to launch when two mods export the same packages. If the error names com.github.stephengold.joltjni, a mod other than Zarith bundles jolt-jni. Only Zarith may carry it.

A group floats in the air

It fell asleep there. Sleeping bodies feel no gravity. Usually something removed the support under it in a way the terrain check has not seen yet, and it falls a tick or two later. If it stays:

A body falls through the world at chunk edges

Unloaded chunks are left out of the terrain, so a body moving into an unloaded chunk has no ground there. Keep physics where players are, or keep the chunks loaded.

Players rubber band on a moving group

Player collision with groups runs on the client against the pose the client has drawn, which is about two ticks behind the server. The server does not collide players with solids at all, so it agrees with whatever the client did. If you see rubber banding, something on the server is moving the player: check for another mod that moves players or a server side anti cheat plugin.

My subclass’s groups are invisible

The renderer is registered per entity type. Register BlockGroupRenderer::new for your own type in your client setup.

My vehicle does not respond

Saved vehicle settings changed after an update

The settings arrays only ever grow at the end. If a value moved, someone reordered an array; see Saved data.

A joint does not come back after reloading

Joints between groups are made again only when both groups are loaded. The holding group retries every 20 ticks. If the other group was destroyed rather than unloaded, the joint is gone for good.

Reporting a bug

Include the Minecraft version, the loader and its version, the Zarith version, the output of /zarith stats in the dimension where it happens, and the log lines starting with Zarith:.