promotional bannermobile promotional banner

QNM

Prevents Quark wood posts from taking up huge amounts of memory in large modpacks and crashing servers with out-of-memory errors.

Real-World Results

Test environment: Linux server, 20 GB RAM, modpack with 300+ mods.

Without QNM With QNM
Stability Crashed with OOM after about 2 hours on average Ran 24 hours straight with no crash
Memory usage Kept climbing until the heap was full Stayed at about 10 GB

The Problem

Every Quark wood post registers 6 directional connection properties, each with 3 possible values. That gives 4,374 block states per post, or 122,472 across all 28 post variants, about 84% of all of Quark's block states.

All of these states are created at startup and stay in memory for the whole session. This happens even if no posts are ever placed, and turning off the Wooden Posts module in Quark's config does not remove them. Mods that keep their own copy of every block state, such as WorldEdit, multiply the cost.

The Fix

  • Each post keeps only its axis and waterlogged properties. That cuts its states from 4,374 to 6, and the total from 122,472 to 168, a reduction of about 99.86%.
  • Connections to chains, lanterns, hanging signs and other posts are worked out from the neighboring blocks instead of being stored. They look and collide the same as in vanilla Quark.
  • No block entities, no per-tick scanning and no per-position caches. The extra cost is fixed and does not grow with the number of posts placed.
  • The client still uses Quark's original models and textures, so standard multipart resource packs keep working.

Notes

  • Required on both client and server.
  • Block IDs, axis and waterlogged state are kept, so existing worlds load normally and connections come back from neighboring blocks. Back up your world before using it for the first time.
  • connect_* properties can no longer be set with commands.

QNM Team

profile avatar
  • 23
    Followers
  • 37
    Projects
  • 12.6M
    Downloads

More from TheFlareStarView all