DMZCA Perf Fix

Performance companion for DMZCA (0.5.x) + DragonMineZ & DMZ Ultra on Forge 1.20.1 — eliminates village TPS/FPS lag via reflection caching, lazy StatsData lookup, villager hair LOD & FormParts caching (23 FPS -> 80–110 FPS).
Back to Files

dmzca_perf_fix-1.1.0.jar

File namedmzca_perf_fix-1.1.0.jar
Uploader
FPGAMESBRFPGAMESBR
Uploaded
Nov 25, 2026
Downloads
5
Size
34.6 KB
Mod Loaders
Forge
File ID
9804647
Type
R
Release
Supported game versions
  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:dmzca-perf-fix-1825390:9804647")

Learn more about Curse Maven

What's new

DMZCA Perf Fix v1.1.0 — Client Render & Village FPS Breakthrough

Major Performance Improvements

  • Eliminated all 13 eager .orElse(new StatsData(player)) allocations across DragonMineZ 2.x client renderers (DMZRacePartsLayer ×6, DMZRenderHand ×3, DMZPlayerRenderer, DMZSkinLayer, DMZThirdPartyLayerForwarder, DMZCustomArmorLayer):
    • Cut StatsData.<init>() on the Client Render thread from 20.53% → 0.00% (0 ms).
    • Cut CustomHair.<init>() from 20.00% → 0.00% (4 ms).
    • Cut DMZRacePartsLayer total render cost from 17.93% → 1.08% (16.6× faster).
  • Smart Distance LOD for DMZCA Villager 3D Voxel Hair (DMZHairLayer):
    • Applies exclusively to NativeMcaPuppet villagers (real players and UI portraits remain 100% unchanged): sub-pixel detail up to 8 blocks, solid 3D hair blocks from 8–28 blocks, culled beyond 28 blocks, and 1 physics substep up to 12 blocks.
    • Cut DMZHairLayer from 5.34% → 2.82% (2.2% after warmup).
    • Optional JVM overrides: -Ddmzca.hairLodDistanceBlocks=28, -Ddmzca.hairPixelDetailBlocks=8, -Ddmzca.hairPhysicsBlocks=12.
  • Per-Entity Lock-Free Cache for DMZ Ultra FormPartsLayer.planFor:
    • Eliminates 1-slot static lookOf cache thrashing when multiple villagers are visible using an immutable AtomicReferenceArray cache.
    • Cut FormPartsLayer from 3.18% → 1.29% (0.9% after warmup).
  • Expanded DMZCA Reflection Helper Caching (+23 helpers, 57 total replaced):
    • Added client render reflection helpers including NativeHybridTailRig.call (2.42% → 0.68%), NativeBioTailAnimator.method, NativeTailMotion059.invoke, NpcFusionFaceBlend059.get, PlayerPotaraLeftEarring.call, plus KiControlBridge and additional field helpers.
  • Automatic Mojmap → Forge 1.20.1 SRG Fallback:
    • Automatically resolves Mojang reflection names (getCompound → m_128469_, putInt → m_128405_, put → m_128365_, width/height → f_96543_/f_96544_), completely eliminating KiControlBridge NoSuchMethodException log spam on Forge 1.20.1.
  • Server-Side GenomeBridge.onTick Throttle:
    • Redirects per-tick GeneticLineageArchive.captureNow(entity) inside GenomeBridge.onTick to DMZCA's 128-tick staggered GeneticLineageArchive.capture(entity).

Verified Benchmark Impact (Populated MCA + DMZCA Village)

  • No Fix: ~23 FPS (44.06% DMZCA server tick + severe reflection & GC stutter)
  • v1.0.0: ~50 FPS volatile (server fixed, but client Render thread 100% CPU-choked with 178.87 ms frame spikes)
  • v1.1.0: 80–110 FPS stable (NativeMcaRenderEvents cut from 37.70% → 15.84%, entity rendering nearly halved, 16.04% OpenGL/SwapBuffers CPU headroom restored, 0 errors in latest.log)

This mod has no additional files