Download WorldgenFeatureFix — Minecraft Mods — MetaMods

WorldgenFeatureFix

Active

Downloads

0

Last update

2 months ago

Versions

1.21 — 1.21.8
Server
Fabric
Forge
Neoforge

WorldGenFeatureFix

This mod solves a critical issue that occurs when using custom world generation datapacks. When world settings use the minecraft:lake or minecraft:snow_and_freeze placement features with water, chunk generation crashes with an error. This bug is documented in Mojang's bug trackers under numbers MC-273228 and MC-272370.

The mod's development was inspired by a corresponding pull request in the PaperMC repository. To fix the problem, mixins are applied that restore the proper functioning of these features.

Technical Details

In Minecraft version 1.21, the chunk generation system was significantly optimized, which unintentionally broke the freeze detection mechanism in the lake creation function. The problem occurs due to attempts to access inaccessible world areas during generation.

Since in the standard version of the game the lake creation function is used exclusively for generating lava lakes, this error does not appear during normal gameplay. However, custom world generators using water lakes encounter critical crashes. The mod implements a solution that reverts to using the getUncachedNoiseChunk method, allowing the lake creation function to work properly again.

Important Note

It should be noted that the LakeFeature function is considered deprecated, and Minecraft developers are gradually moving away from its use, except for generating lava lakes. The protection against accessing unsafe chunks was intentionally implemented to prevent problematic code, such as that contained in the unused part of LakeFeature when creating water lakes.

Although this mod solves the current problem, it is not an ideal solution and may mask more serious issues that will remain undetected. Use at your own risk.

Project members
SimonShiki

SimonShiki

Developer

Created: 10 Aug 2025

ID: 261777