跳到正文

MMCMF-MemoryMaster

作者:mornfire

Server-side heap memory optimization mod.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

MemoryMaster — Server-Side Heap Memory Optimization Mod

For NeoForge 1.21.1, server-side only; no client installation required.

All 7 modules are enabled by default and can be disabled individually. Each module’s mixins are kept in separate files, so a problem in one module won’t affect the others.

Safety is a design prerequisite:

  • The mixin plugin only validates target classes through resource lookup and does not load any classes (avoiding disruption of other mods’ injection timing).
  • All injections use require = 0, and the mixin config uses required = false.
  • All optimization logic is wrapped in try-catch; on exception it falls back to vanilla behavior and logs it.
  • There is a self-check at the transform stage and another after server startup to confirm whether injection points actually took effect; behavior-type injection points that didn’t take effect are automatically downgraded.
  • The mixin config uses priority = 9999, applied after other mods.
  • After startup it scans other mods’ mixins and proactively yields and writes to config when write-type overlap is found.
  • /mmcmf panic disables all optimizations with one command.

Modules

  • structures — Structure template cache LRU cap (default 30; the only write-type optimization enabled by default)
  • diagnose — Read-only diagnostics: /mmcmf report, /mmcmf diagnose, JFR 96–128 byte allocation tracking
  • guava — Guava immutable collection duplication measurement (write rewriting disabled by default)
  • bytepool — byte[] bucketed pool (16/32/64/128 KB; pooling application disabled by default)
  • objpool — Collection capacity pre-allocation based on historical peaks (disabled by default; cross-session learning)
  • smallobj — Creation-count statistics for BlockPos / ItemStack / advancement objects
  • secondopt — Conflict detection with FerriteCore/ModernFix/C2ME/Clumps, read-only leak observation, yielding

Commands

  • /mmcmf status — Module status and injection point self-check
  • /mmcmf report — JVM memory + memory-saving statistics (resident and allocation amounts calculated separately)
  • /mmcmf diagnose [smallobj|leaks|mods]
  • /mmcmf optimize|disable <module>|all
  • /mmcmf panic | unpanic | reload

It should be noted: the only write-type optimization enabled by default is the structure template cache cap; the rest are measurement and optional experiments.
The real memory hogs are still view distance / simulation distance, ModernFix’s dynamic_resources, and FerriteCore — this mod does not replace them.

常见问题

MMCMF-MemoryMaster 支持哪些 Minecraft 版本?

MMCMF-MemoryMaster 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

MMCMF-MemoryMaster 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

mornfire 的其他作品

查看全部 →