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
axisandwaterloggedproperties. 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 支持哪些 Minecraft 版本?
QNM 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
QNM 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
TheFlareStar 的其他作品
查看全部 →Optimization of Campfire Smoke
优化原版营火的烟雾粒子效果
Citadel Fix
这个模组修复了 Citadel 启动时拉取赞助商名单导致的卡顿,并优化了启动速度。
Toms Storage Star Optimized
Tom的存储的轻量优化模组。
Shipwreck Fix
这个模组修复了1.19.2/1.20.1中沉船群组(MC-249136)的漏洞,避免其长时间卡顿。
评论
登录后评论和评分