Back to mods
WorldgenFeatureFix project artwork

Modrinth · Minecraft mod

WorldgenFeatureFix

Fix custom world generation datapack crashes when using minecraft:lake feature ( MC-273228 and MC-272370)

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which WorldgenFeatureFix release matches 1.21 Fabric?

Updated 1 year ago
alpha file 1.0.1
Game version 1.21, 1.21.1, 1.21.2
Loader Fabric

WorldgenFeatureFix 1.0.1 targets 1.21, 1.21.1, 1.21.2 with Fabric. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.

Where it goes

Is WorldgenFeatureFix required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does WorldgenFeatureFix 1.0.1 need?

1.0.1 on 1.21 Fabric. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add WorldgenFeatureFix without breaking your instance.

Built for WorldgenFeatureFix 1.0.1 on 1.21 Fabric. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.1. It targets 1.21, 1.21.1, 1.21.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.1. It opens that exact file at the source.

About this project

What does WorldgenFeatureFix add?

WorldGenFeatureFix

Tips: Mojang has marked this problem as fixed since 26.1 Snapshot 6, you may don't need this mod in 26.1 anymore.

What this mod fixes?

When custom world generation datapack uses minecraft:lake or minecraft:snow_and_freeze placed feature with water, The chunk generator crashes. (See MC-273228 or MC-272370 for more details).
Inspired by This pull request, This mod apply mixins to make them work.

Techinal Details

In version 1.21, chunk generation has been highly optimized, which unintentionally breaks the freeze detection of the lake feature since it may trying to access inaccessible chunks. However, since Mojang only uses the lake feature for lava lakes at now, this issue does not occur in vanilla Minecraft — but it does affect custom world generators! This mod applies mixins that fallback to getUncachedNoiseChunk, allowing the lake feature to work correctly again.

Disclaimer

However, The PR also mentioned that LakeFeature is deprecated and vanilla has moved away from using it for anything except for lava lakes.
The error for unsafe chunk gets removing here is an intentional safeguard against bad code, such as that in the dead path in LakeFeature when creating water lakes. While it may appear to 'fix' the problem at hand it is not a proper solution and will cause other more serious problems to go undetected. Use at your own risk. (At least it works perfect in my server)

Project description from Modrinth.

Pick your setup

WorldgenFeatureFix by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

36 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

WorldgenFeatureFix versions and loaders

2 of 6 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.