Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-262252

The generation of lush caves and dripstone caves is poorly defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.4, 23w17a, 23w18a, 1.20 Release Candidate 1, 1.20
    • None
    • Confirmed
    • World generation
    • Normal
    • Gameplay

      This maybe looks like multiple bugs, but it is caused by one mistake, so I report it as one ticket.

      What happened?

      As we know, the 3D biome generation is controlled by six noise parameters from density functions. In a six-dimensional space, some intervals are defined. If the parameter point falls in a certain interval, the corresponding biome will be generated. If not, it searches the nearest interval.

      This is reasonable, unless there are two intervals that overlap — it will be difficult for the game to decide which to generate.
      However, in vanilla, the intervals for lush caves and dripstone caves do overlap. Here are their definations in the json format:

              {
                "biome": "minecraft:dripstone_caves",
                "parameters": {
                  "temperature": [-1, 1],
                  "humidity": [-1, 1],
                  "continentalness": [0.8, 1],
                  "erosion": [-1, 1],
                  "weirdness": [-1, 1],
                  "depth": [0.2, 0.9],
                  "offset": 0
                }
              },
              {
                "biome": "minecraft:lush_caves",
                "parameters": {
                  "temperature": [-1, 1],
                  "humidity": [0.7, 1],
                  "continentalness": [-1, 1],
                  "erosion": [-1, 1],
                  "weirdness": [-1, 1],
                  "depth": [0.2, 0.9],
                  "offset": 0
                }
              }
      

      It is clear that the overlapping region is when continentalness is 0.8~1 and humidity is 0.7~1. As this picture shows (typo: huminity->humidity):

      What are the effects of this?

      • For parameter points falling into the overlapping region, the biome generation is an undefined behavior. Sometimes lush caves and sometimes dripstone caves are generated. Two sides of a chunk border may have different biomes.
      • "/locate biome" doesn't work correctly for places whose parameters fall into the overlapping region.
      • Potential issues about different biome generations with the same world seed
      • Potential parity issues with Bedrock Edition

      Examples for reproducing:

      Biome generation:

      Example 1

      Seed: 514
      Coords: /tp 1557950 25 -24433376

      • Press F3+G to enable chunk border displaying; Press F3 to enable debug screen
      • At (1557950,25,-24433376) and (1557950,25,-24433375), which are in two biome cells on different sides of the border
      • Found that the two biome cells have different biomes, though both these parameters fall into the overlapping region.
      Example 2

      Seed: 514
      Coords: /tp -18198579 19 -17221302

      • Around (-18198579,19,-17221302)
      • Found that in a canyon, a chunk of dripstone caves is surrounded by two chunks of lush caves, though in the canyon, parameters of all these three fall into the overlapping region.

      /locate biome:

      Seed: 514
      Coords: /tp -18198579 19 -17221302

      • Stay at -18198579,19,-17221302, and do not move
      • Run "/locate biome dripstone_caves"
      • Run "/locate biome dripstone_caves" again
      • Run "/locate biome dripstone_caves" again
      • Run "/locate biome lush_caves"
      • Run "/locate biome lush_caves" again
      • Run "/locate biome dripstone_caves"
      • Run "/locate biome lush_caves"
      • Found that the /locate biome works incorrectly in the overlapping region

            Unassigned Unassigned
            Chixvv Dl
            Votes:
            14 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: