← Back to documentation

Server documentation

LeanCore

Active

Hytale • Version 1.7.0

Install, commands, config, permissions, LITE profile, predictive retention, motion model, HUD, heatmap, and zone pin for LeanCore.

Install, commands, config, and permissions for LeanCore.


Overview

LeanCore is built to lower JVM heap use on Hytale servers. As players explore, every area they touch keeps its chunks and entities resident in memory, and the engine is slow to release them, so heap climbs and stays high long after everyone has moved on. LeanCore decides what stays loaded and what gets released, by modeling where players are, where they are about to be, and which parts of the map they actually return to. How much it frees depends on the world, and chunk unload only starts after /leancore probe. Solo embedded runs profile LITE with a real memory governor, adaptive view, AFK reclaim, and on-by-default demand learning. STANDARD and FULL profiles add policy bandit, holdout, and full governor paths when enabled. As of 1.6.0 a per-player motion model drives predictive zone retention (unload biased away from where players head, current/predicted view never evicted) and a reuse-distance + survival model scales dormancy per zone. Includes Activity Sense, session heap reporting (/leancore savings), unload probe gate, dedicated bootstrap, always-on [diag] diagnostics, learning snapshot v8 (gzip + prune, v7 compatible), and world-thread-safe governor dispatch. Requires Hytale server >=0.5.6. Does not touch client FPS, GPU, or TPS.


Installation

  1. Download LeanCore-1.7.0.jar from the CurseForge Files tab
  2. Place the JAR in your server’s mods/ folder
  3. Start the server. Config is generated at mods/durkz_LeanCore/LeanCore.json
  4. Run /leancore probe if you rely on chunk unload (LITE or STANDARD/FULL)
  5. Grant staff HUD/admin access (see Permissions below)
  6. Run /leancore memory and /leancore status after about a minute

Singleplayer / local host: use default hudViewerGroups / hudAdminGroups (OP, Admin) or grant permission nodes with /perm.


Embedded host profiles

PlayersProfileTickWhat runs
1 (solo local)LITE30s (60s idle)Lite governor, adaptive view, AFK unload, lite learning
1 + embeddedStandardProfileSTANDARD15sLocal dogfood of govern/learning without FULL 5s tick
2–8 (friends)STANDARD15sClassifier; govern/learning/HUD if enabled in config
9+ (dense local)FULL5sFull runtime per config
Dedicated JVMFULL5sFull runtime per config

Config: localHostMode: "AUTO" (default). Use "PASSIVE" to disable background runtime entirely. Set dedicatedServerMode: true on a dedicated JVM host.

Boot log (solo): LeanCore 1.7.0 setup (localHostMode=AUTO). and Runtime started profile=LITE. Friend joins → profile LITE -> STANDARD.


LITE profile (solo embedded)

FeatureBehavior
Adaptive view100% in COMFORT until chunk or heap pressure; gentle cuts in WATCH; aggressive only in TIGHT/CRITICAL
Dual signalsJVM heap tier + chunk pressure (loaded / view budget)
Unload AFKDormant/frozen zones when idle; probe gate; no governEnabled required
LearningliteLearningEnabled=true by default; demand shapes view cuts; no bandit in LITE
Tick budgetHeavy work on heap sample (~60s), world-thread dispatch

STANDARD/FULL: view-radius and chunk unload still require governEnabled, learningEnabled, and unloadEnabled as before.


Features

  • Runtime profiles: LITE, STANDARD, FULL on embedded vs dedicated hosts
  • LITE solo governor: adaptive view, zone demotion, AFK unload, demand learning
  • Heap tiers: COMFORT, WATCH, TIGHT, CRITICAL. Rolls back if a cut causes problems.
  • Zone dormancy: HOT near players. Empty wilderness steps down WARM, DORMANT, FROZEN on timers you set.
  • Predictive retention (1.6, motionModelEnabled): per-player motion model biases unload away from a player’s heading; zones in the current or predicted view are never eviction candidates
  • Reuse-distance + survival model (1.6, zoneReuseModelEnabled): learns revisited zones and scales dormancy thresholds per zone
  • Retention budget: global cap with per-player weight from activity scores
  • View-radius cuts: throttled when heap or chunk pressure is high
  • Cinematic view boost (1.6, motionViewRadiusBoostEnabled, opt-in): raises view distance for fast movers; off by default (per-tick view radius rewrites churn chunk loading on the current engine)
  • Chunk unload: drops chunks in dormant/frozen zones when tiers require it; ranked by distance to a zone’s nearest chunk (AABB edge)
  • Always-on diagnostics (diagnosticLogEnabled): startup/shutdown summaries and [diag] decision logs per profile
  • Learning data: heap windows (60s / 15m / 24h), policy bandit (STANDARD/FULL), demand model, zone reuse stats; saved across restarts (schema v8)
  • Activity Sense: online softmax classifier (MINER, LUMBERJACK, FARMER, BUILDER, FIGHTER, EXPLORER)
  • Session savings: /leancore savings reports JVM heap peak/baseline/delta and lite or standard governor activity
  • Unload probe gate: unload blocked until /leancore probe passes when the gate is enabled
  • Dedicated bootstrap: one-time preset on first dedicated boot
  • Admin HUD (/leancore hud on): small heap/tier overlay. Off by default.
  • Heatmap, zone pin, optional CRITICAL webhook

Commands

Main command: /leancore

CommandAccessDescription
/leancore statusEveryoneProfile, preset, heap tier, lite flags, unload gate
/leancore memoryEveryoneHeap snapshot, tier, footprint
/leancore savingsEveryoneSession JVM heap, lite/standard governor state, zone/chunk actions
/leancore zonesEveryoneDormancy map counters
/leancore learnEveryoneLearning diagnostics; LITE shows demand model only
/leancore learn playerEveryoneDemand features, posterior, activity EMAs
/leancore probeEveryoneAPI capability probe (S1–S5)
/leancore hud onHUD viewersEnable opt-in memory HUD overlay
/leancore hud offHUD viewersDisable HUD overlay
/leancore hud statusHUD viewersHUD eligibility and toggle state
/leancore heatmap [limit]StaffZone heatmap
/leancore zone pinStaffPin current zone as HOT
/leancore zone unpinStaffUnpin current zone
/leancore zone pinsStaffList pinned zones
/leancore status
/leancore memory
/leancore savings
/leancore zones
/leancore learn
/leancore learn player
/leancore probe
/leancore hud on|off|status
/leancore heatmap [limit]
/leancore zone pin|unpin|pins

Permissions

LeanCore uses permission nodes and/or config group lists. Either path can grant access.

PermissionDescription
durkz.leancore.hudToggle and view the opt-in memory HUD (/leancore hud …)
durkz.leancore.adminHeatmap, zone pin/unpin/pins, and admin HUD tools
  • HUD viewers: groups in hudViewerGroups and/or durkz.leancore.hud
  • Admin heatmap, zone pin: hudAdminGroups and/or durkz.leancore.admin

Config groups (default)

"hudViewerGroups": ["OP", "Admin"],
"hudAdminGroups": ["OP", "Admin"]

Quick setup with Hytale /perm

/perm group add OP durkz.leancore.admin

Configuration (LeanCore.json)

Path: mods/durkz_LeanCore/LeanCore.json

KeyDefaultDescription
enabledtrueMaster enable
localHostModeAUTOAUTO, PASSIVE, or FULL on embedded host
governEnabledfalseSTANDARD/FULL governor
learningEnabledfalseSTANDARD/FULL learning
unloadEnabledfalseSTANDARD/FULL policy chunk unload
unloadProbeGateEnabledtrueBlock unload until /leancore probe passes
probePassedAtMs0Set when probe passes
embeddedStandardProfilefalseSolo embedded → STANDARD instead of LITE
dedicatedServerModefalseForce FULL profile
liteMemoryGovernorEnabledtrueSolo lite governor
liteLearningEnabledtrueSolo demand model + persistence
liteViewRadiusEnabledtrueAdaptive view on solo
liteUnloadEnabledtrueAFK reclaim on solo
liteUnloadIdleSeconds180Idle before lite unload sweeps
liteViewPressureThreshold0.85COMFORT cap when chunk saturation high
motionModelEnabledtruePer-player motion model + predictive retention
zoneReuseModelEnabledtrueReuse-distance + survival model; per-zone dormancy thresholds
motionViewRadiusBoostEnabledfalseOpt-in cinematic view boost for fast movers
diagnosticLogEnabledtrueAlways-on [diag] session/decision logs
dormantAfterMinutes8WARM → DORMANT idle time
frozenAfterMinutes20→ FROZEN idle time
gcHintEnabledfalseExperimental LITE idle GC nudge

Full key reference: see mod page config section or repo README.

Learning snapshot: mods/durkz_LeanCore/learning.state.gz (schema v8, gzip; reads v7). Legacy learning.state migrates on first flush.

HUD toggles per player: mods/durkz_LeanCore/hud.state.


  • Solo / local: keep localHostMode: AUTO. LITE governor and learning are on by default.
  • Dedicated or friends: enable governEnabled, learningEnabled, and unloadEnabled as needed; run /leancore probe before policy unload.
  • Use /leancore savings after 15+ minutes on dedicated hosts to read heap delta and governor counters.

Verifying it works

  1. Log should show LeanCore 1.7.0 setup (localHostMode=AUTO). and profile=LITE on solo
  2. /leancore status: profile LITE, lite flags on, unload gate line when unload is enabled
  3. /leancore savings: lite governor ON after ~60s on solo
  4. Friend joins → log profile LITE -> STANDARD
  5. Mine ore → /leancore learn player shows posterior=MINER and demand/viewScale
  6. With unload enabled, run /leancore probe → gate opens and persists probePassedAtMs

What matters is server JVM heap, not client FPS or GPU.


License

MIT License. Copyright (c) 2026 DurkzPRG