Skip to main content
FORGEJO ERA / ISSUE #582

Cloud status is typed as a boolean for Minecraft 1.12.2 through 1.13.2

closedOpened by MelanX on

Original description​

By MelanX · October 23, 2026

Crate: ephervex-options (generated data) and tools/minecraft-options

Commit: 2b2af1e4f8166d02e4732d19e040a53745d97a51

Behavior

The legacy loader analysis types a key as boolean when its load block compares against the literal "true", even when other literals are compared too. The legacy save analysis only matches "key:" + expr, so constant lines such as renderClouds:true, renderClouds:fast, and renderClouds:false are missed. resolve_default never checks the declared type against the backing field descriptor, so a boolean record carries an I field with default 2.

For 1.12.2 through 1.13.2 the dataset therefore maps cloudStatus to {"kind":"boolean"}, while the game stores true, fast, or false (an enum_token from 1.20.2 on).

For 1.14 through 1.20.1, true and false are never counted as enum tokens in analyse_legacy_body, so the persisted form stays unknown and cloudStatus has no codec there.

Expected behavior

Every literal compared or printed for a key is recorded, and a key with a literal other than true/false is not typed boolean. Constant key:value printlns count as save evidence. The type is cross-checked against the field descriptor. cloudStatus for 1.12.2 through 1.13.2 is regenerated as a three-token enum, and the 1.14 through 1.20.1 releases gain a proven codec if the evidence supports it.

Impact

fast cannot be written or round-tripped for these releases. In crates/options/src/apply.rs an enum preference against a boolean codec returns a type mismatch, so the cloud preference is skipped entirely, including plain true and false.

Locations

  • tools/minecraft-options/analyze_options.py legacy_load_blocks (790-852), analyse_legacy_body (855-932, boolean inference 877-878 and 920-921, token filter 907), legacy_save_blocks (935-976)
  • tools/minecraft-options/analyze_options.py resolve_default (1633-1668)
  • crates/options/data/minecraft-options.json schemas for 1.12.2 and 1.13 to 1.13.2

Validation and limitations

Confirmed from javap of the 1.12.2 and 1.13.2 option classes (load chain true=2, false=0, fast=1, and the three literal printlns) and from the cached raw record (type: boolean, field_descriptor: I, default: 2). The 1.14 through 1.20.1 unknown form was read from the cached records.