Lothrazar / Cyclic

Minecraft mod written in Java
MIT License
166 stars 97 forks source link

Fix worldgen crash on 1.20 #2387

Closed Apollounknowndev closed 7 months ago

Apollounknowndev commented 8 months ago

Closes #2394, #2388, #2377, #2371, #2364, #2354, and #2332.

The Issue

Previously, the biome modifiers were structured so each biome tag got its own biome modifier that added a certain combination of flowers. This meant beach biomes were assigned cyan and purple flowers, badlands were assigned absalon and cyan flowers, etc.

However, issues arise when worldgen mods have biomes that fit into multiple categories. For example, a biome both tagged as a badlands biome and a mountain biome would get absalon flowers, cyan flowers, purple flowers, and cyan flowers... again? The game tries to maintain a consistent ordering of features to prevent generation inconsistencies, but when you have multiple of the same feature in a single biome the game can't really do that and it crashes as a result.

The Fix

The biome modifiers have been restructured to each biome modifier controls a specific flower type, and group biome tags were added that those biome modifiers target.

This means that instead of a modify_forest biome modifier telling the game to place the flower_purple feature in all biomes in the #is_forest tag, a purple biome modifier tells the game to place the flower_purple feature in all biomes in the #cyclic:has_flower/purple tag, which includes #is_forest, #is_beach, etc. As a result, a flower feature can never get placed twice in the same biome and no crash will occur.

Apollounknowndev commented 7 months ago

Can fixing this be prioritized? This issue has existed for a long while now and there's still many people affected by it. This makes Cyclic flat out unusable with several big worldgen mods.

Lothrazar commented 7 months ago

this looks awesome thanks for your patience and hard work on this im going to check it out

sugan-reden commented 7 months ago

Hi, thank you so much for your work. 😄

I have updated my issue #2388 , as I found that with the latest version of Cyclic, it seems to still persist.

As a fix, I have reverted back the Cyclic version and use it with Cyclic Crash Fixer. I have included more details in the update/comment.

Thanks for your hard work, I really admire what you guys do. Please keep it up! And don't forget to take care of yourselves. 😁

kingokksa commented 6 months ago

提示:cyclic 1.12.9 修复了这个生成世界的问题,但在用之前请删掉Cyclic Crash Fixer,二者一起用还是会造成崩溃 Tip: Cyclic 1.12.9 has fixed this issue with generating worlds, but please remove the Cyclic Crash Fixer before using it. Using both together will still cause crashes