Skip to content

[1.18.2] Geome ID fallback drops biome-dictionary weights for dynamic biomes #262

Description

@SkyBlade1978

Summary

OreSpawn 4.0.10.118021 bakes exact biomes plus biome_dictionary contributions into its identity-keyed geome table, but the stable-ID fallback used for dynamic world-registry biome instances is built from exact biome rules only. In an integrated CakeWorld world, a custom biome tagged COLD receives its exact geome rule but not the COLD dictionary contribution.

Environment

  • Minecraft 1.18.2
  • Forge 40.3.0
  • OreSpawn 4.0.10.118021
  • CurseForge/Maven artifact: curse.maven:mmd-orespawn-245586:8750114
  • OreSpawn source tag: 4.0.10.118021 (ccfe01a207a66d5c66342c3d534237a1540b9a78)
  • Integrated test mod: CakeWorld
  • Fixed world seed: 5059928472718672684

Minimal provider rule

Define cakeworld:peppermint_fold and cakeworld:rock_candy_uplift as valid geomes, register cakeworld:marshmallow_peaks as a custom biome, and add its biome key to BiomeDictionary.Type.COLD. The relevant provider rules are:

"biomes": {
  "cakeworld:marshmallow_peaks": {
    "cakeworld:peppermint_fold": 6.0,
    "cakeworld:rock_candy_uplift": 14.0
  }
},
"biome_dictionary": {
  "COLD": {
    "cakeworld:peppermint_fold": 8.0
  }
}

Generate enough Marshmallow Peaks columns to observe the stable-layer geome selection, then repeat against the same saved world.

Expected

Exact-biome and biome-dictionary rules are additive regardless of whether lookup succeeds through the Biome identity table or the stable biome ID fallback. With the current merge behavior and the default starting weight of 1.0, the two relevant fallback weights should both be 15.0 before any applicable heuristic:

  • Peppermint Fold: 1 + 6 + 8 = 15
  • Rock-Candy Uplift: 1 + 14 = 15

A stable-layer sample should therefore contain both geomes, and fresh/reload classification should agree.

Actual

At fixed seed 5059928472718672684, the integrated audit sampled 211 Marshmallow Peaks columns:

Biome ID/dictionary geome audit: marshmallow_peaks={cakeworld:rock_candy_uplift=211}
COLD Marshmallow Peaks produced no Peppermint Fold columns

The same result occurred on fresh generation and same-save reload. The exact biome rule is visible, but the dictionary contribution is absent.

Suspected source seam

The current source appears to make the two baked lookup paths inconsistent:

This is consistent with a biome supplied by the dynamic world registry missing the identity lookup and falling back to an exact-only identifier profile.

Suggested regression test

Extend the identifier fallback bake so it applies the same exact plus dictionary rules as the identity path, then force BakedGeomeConfig to use the ID fallback (empty identity map) for a known COLD biome. Assert that the fallback array matches the identity-baked array, including the dictionary contribution.

The existing GeomeTransitionTest.configuredBiomeWeightsWorkWithoutAForgeBiomeRegistryEntry covers exact ID rules only, so it does not catch this case.

Acceptance criteria

  • Stable-ID fallback includes all applicable biome_dictionary contributions as well as exact biome rules.
  • Exact and dictionary contributions retain the current additive semantics.
  • Dynamic-registry custom biomes and Forge-registry biome objects produce the same baked weights for the same key.
  • No registry lookup, config read, string construction, or allocation is added to the column-generation hot path; resolve this while baking.
  • The integrated fixed-seed fresh-world and same-save reload audits both observe Peppermint Fold and Rock-Candy Uplift in Marshmallow Peaks.

Integrated test command

From the CakeWorld 1.18.2 checkout, resolve the released CurseForge artifact and run:

$env:JAVA_HOME='C:\Users\johnb\.jdks\jdk-17.0.1'
$env:Path="$env:JAVA_HOME\bin;$env:Path"
$env:GRADLE_USER_HOME='D:\CakeWorld\.gradle-verify-cache'
.\gradlew.bat runGameTestServer --no-daemon `
  -PcakeworldFreshWorldgenRuntime=true `
  -PcakeworldFreshWorldgenRunDirectory=run-fresh-worldgen-os410-cursemaven-r10

Use an empty run directory for the fresh-world pass, then run the same command unchanged for the same-save reload pass. The focused test is biomeidanddictionarygeomerulesarebakedandobserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions