Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings

WorldgenFeatureFix

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

1,053
1
World Generation

Compatibility

Minecraft: Java Edition

1.21.x

Platforms

Fabric
Forge
NeoForge

Supported environments

Server-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source

Creators

SimonShiki
SimonShiki Member

Details

Licensed CC0-1.0
Published last week
Updated last week
DescriptionChangelogVersions

WorldGenFeatureFix

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.

Modrinth is open source.

main@16c5a5a

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.