index architecture stat-reference template-mode config-schema hardware-sensors build+ci | repo↗ homepage↗

config schema — minetuner.json

Location: <fabric config dir>/minetuner.json. Gson, pretty-printed, atomic write (.tmp + ATOMIC_MOVE). See architecture.html#config-lifecycle for load/save/corruption-recovery behavior — this page is just the field list. Source: config/MineTunerConfig.java.

There is no versioned migration system. Backward compat is handled ad hoc per-field in load()/backFill() (null-guards, one explicit rename: anchorDx/anchorDyanchorFracX/anchorFracY). If you hand-edit this file, know that an unparseable result gets backed up as minetuner.json.bak-<epoch-ms> and replaced with fresh defaults — it does not merge or repair.

root object

fieldtypedefaultnotes
nextIdint1next id handed to a new StatListConfig; not reused after delete.
listsStatListConfig[][list#0]see per-list schema below.
overlayEnabledbooltrueglobal show/hide. Same switch as the Toggle Overlay keybind.
hardwareSensorsEnabledboolfalsesee hardware-sensors.html.
hardwareSensorBaseUrlstringhttp://localhost:8085LHM Remote Web Server base URL, no trailing slash.
hardwareSensorPollIntervalMsint1500clamped ≥100 by clampGuiTuning(). Read live by the poller thread every cycle.
hardwareSensorRequestTimeoutMsint300clamped ≥50. Baked into the poller's HttpClient at construction — changing this restarts the poller (see reconcileWithConfig()).
reorderPanelMaxVisibleRowsint16clamped ≥3.
panelRowHeightint (px)13clamped ≥6.
panelWidthint (px)160clamped ≥60. Standard editor panel width.
widePanelWidthint (px)216clamped ≥ panelWidth. "Edit Stats" panel only.
panelPaddingint (px)4clamped ≥0.
dragSnapThresholdPxint (px)6clamped ≥0.
textScaleMinfloat0.5clamped ≥0.1.
textScaleMaxfloat2.0clamped ≥ textScaleMin.

StatListConfig — one per HUD panel, in lists[]

fieldtypedefaultnotes
idintstable identity. TemplateEngine's parse cache and warned-token set are keyed by this.
namestring"List <id>"
statEnabledmap<Stat name, bool>all falseevery stat starts disabled on a new list — nothing is on by default, contrary to older builds.
statOrderstring[]enum declaration orderdisplay order for classic mode. getVisibleStats() filters to enabled + dedupes.
statSettingsmap<Stat name, StatSettings>lazy per-statsee below.
statThresholdsmap<Stat name, ThresholdSettings>built from each stat's own defaultsonly present for stats in THRESHOLD_STATS.
anchorCornerenumTOP_LEFTTOP_LEFT / TOP_RIGHT / BOTTOM_LEFT / BOTTOM_RIGHT.
anchorFracX, anchorFracYdouble0.01, 0.01offset from anchor corner as a fraction of screen w/h — scale-independent by design.
anchorDx, anchorDyInteger (nullable)nulllegacy. Pre-normalization raw pixel offsets. Migrated into anchorFrac* on first load if non-null, then nulled out. Don't write these in a new config.
showBackgroundbooltrue
textShadowboolfalse
useCustomColorboolfalsewhen true, overrideColor replaces every stat's normal/threshold color for this list.
overrideColorint (ARGB)0xFFFFFFFF
textScalefloat1.0clamped to [textScaleMin, textScaleMax] by the +/- controls; not force-clamped on raw JSON load.
snapXenumNONENONE / LEFT_ON_CENTER / CENTER_ON_CENTER / RIGHT_ON_CENTER.
snapYenumNONENONE / TOP_ON_CENTER / CENTER_ON_CENTER / BOTTOM_ON_CENTER.
useTemplateboolfalsefalse = classic per-stat-line mode.
templateLinesstring[][]only rendered when useTemplate is true. See template-mode.html.

StatSettings — per (list, stat) pair

fieldtypedefaultnotes
showPrefixbooltrueclassic mode only — shows/hides the "Label: " prefix.
decimalsint1ignored if the stat's supportsDecimals() is false.
renderAsGraphboolfalseignored if the stat's supportsGraph() is false.
graphStyleGraphStylesee belowused only when renderAsGraph is true.

GraphStyle

fieldtypedefaultnotes
showPanelBackgroundbooltrue
showGridlinesbooltrue
showPeakMarkersbooltrue
valueDisplayenumCURRENTNONE / CURRENT / MIN_CURRENT_MAX.
smoothingint00 = off, else moving-average window size (2/3/4 in the UI stepper).
autoScalebooltruewhen false, uses fixedMin/fixedMax instead of scaling to observed range.
fixedMin, fixedMaxfloat0, 100only used when autoScale is false.
width, heightint (px)80, 28
colorModeenumCURRENT_THRESHOLDsee below.
accentColorint (ARGB)0xFF55FF55used only when colorMode == FIXED_ACCENT.

colorMode values:

ThresholdSettings

fieldtypedefaultnotes
enabledboolfalsefalse = ignore goodMin/warnMin, use the stat's own built-in defaultGoodMin()/defaultWarnMin() instead.
goodMinfloatstat-specificcutoff for the green band. Direction (higher-is-better vs lower-is-better) is per-stat, see StatDefinition.higherIsBetter().
warnMinfloatstat-specificcutoff for yellow vs red, same direction as goodMin.

minimal example

{
  "nextId": 1,
  "lists": [
    {
      "id": 0,
      "name": "List 0",
      "statEnabled": { "TPS": true, "FPS": true },
      "statOrder": ["TPS", "FPS", "..."],
      "statSettings": {},
      "statThresholds": {},
      "anchorCorner": "TOP_LEFT",
      "anchorFracX": 0.01,
      "anchorFracY": 0.01,
      "showBackground": true,
      "textShadow": false,
      "useCustomColor": false,
      "overrideColor": -1,
      "textScale": 1.0,
      "snapX": "NONE",
      "snapY": "NONE",
      "useTemplate": false,
      "templateLines": []
    }
  ],
  "overlayEnabled": true,
  "hardwareSensorsEnabled": false,
  "hardwareSensorBaseUrl": "http://localhost:8085"
}

(overrideColor: -1 is 0xFFFFFFFF as a signed 32-bit int — Gson serializes ARGB colors as plain signed ints, not hex strings.)