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

Mushroom generation very rare due to light check with no light calculated while placing mushroom feature

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1 Pre-release 1
    • None
    • Unconfirmed
    • (Unassigned)

      Starting with Minecraft 1.14 with the new light engine, mushrooms almost never generate in the overworld.

       

      Mushrooms require light level less than 13 to be placed during world generation. But starting with version 1.14, lighting is not generated until after feature placement. For skylight, default light value is 15 so no mushrooms generate. The only case where any mushrooms generate, is when a neighbor chunk already has lighting generated, and some part of a placed mushroom patch overflows into that neighbor chunk.

       

      A particular consequence is that the spawn area will contain even less mushrooms, because light propagation usually does not catch up with chunk generation until near the end of loading the world. In 5 newly generated worlds with swamp biome in spawn area, there have been no mushrooms generated (example seed: 2417227005563582448)

       

      The issue has been verified in mod dev environment by adding a conditional breakpoint on block place in RandomPatchFeature#place with condition "new ChunkPos(context.origin()).equals(new ChunkPos(mutableBlockPos)) && blockState.getBlock() == Blocks.BROWN_MUSHROOM" - the breakpoint never hits, so no mushroom blocks are ever placed in the chunk where features are actually generated.

       

      Attached screenshots include: mushroom generation in 1.13.2, a very rare case of mushroom generated in 1.17 in mod dev environment with slowed down generation (to make light propagation catch up, so that there are neighbor chunks with lighting), and a screenshot with the check for light level removed to show where mushrooms are attempted to be placed.

            Unassigned Unassigned
            Barteks2x Bartosz Skrzypczak
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: