Skip to content

FlatLevelSource (Flat World ChunkGenerator) caches the generation settings causing any Neoforge Biome Modifications to not work #2902

@pietro-lopes

Description

@pietro-lopes

Minecraft Version: 1.21.1

NeoForge Version: 21.1.217

Steps to Reproduce:

  1. clone this repo https://github.com/pietro-lopes/FlatChunkGeneratorBug
  2. Create a world with commands/cheats ON
  3. Close the world/game
  4. Launch game, enter previous world
  5. teleport yourself using /execute in flatchunkgeneratorbug:broken run tp @s 0 256 0
  6. fill with air to peek the terrain for ores /fill 1 252 1 9 -63 9 air
  7. You should not be able to see any ores
  8. teleport yourself to a working dimension where it clears the settings cache /execute in flatchunkgeneratorbug:working run tp @s 0 256 0
  9. fill with air just like before, you should see a few ore veins

Description of issue:

When you have a custom dimension with chunk generator type minecraft:flat and you use Neoforge Biome Modifiers to add stuff, those modifications are not applied in certain conditions because how FlatLevelSource caches their Settings

Example:

  • Create a new world, and visit that dimension, works fine for that session.
  • Join a previous created world runs a ChunkGeneration#validate which triggers the caching
  • Using "Recreate world", also causes same issue

Some discussion here:
https://discord.com/channels/313125603924639766/852298000042164244/1455623815186087956

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.21.1Targeted at Minecraft 1.21.11.21.11Targeted at Minecraft 1.21.1126.1Targeted at Minecraft 26.1bugA bug or error

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions