Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on world launch 1.20 with bclib #4

Open
drakosoldier298 opened this issue Jun 13, 2023 · 10 comments
Open

Crash on world launch 1.20 with bclib #4

drakosoldier298 opened this issue Jun 13, 2023 · 10 comments

Comments

@drakosoldier298
Copy link

Unsure what exactly is causing this. but log screams biolith. of which is being force loaded by cinderscapes
which loads version biolith 1.0.0-alpha.5
https://mclo.gs/GdCL4kl

@gniftygnome
Copy link
Contributor

This is probably caused by something bclib does. The call path resulting in attempting to load registry entries before the registry is ready clearly involves bclib. To be very blunt about it, bclib is horrible for mod compatibility. Biolith is not presently tested with bclib (and I am pretty sure it is straight-up incompatible with Better End). I'll poke at this some when I have a little time and see if I can resolve this particular crash but it may just move us along to the next one.

@drakosoldier298
Copy link
Author

alright ill just remove better nether which is the bclib mod im using.
also point out better nethers teams a bit nicer to work with.

@gniftygnome
Copy link
Contributor

also point out better nethers teams a bit nicer to work with.

I'm not certain what you mean by this but I agree they are nice enough. The problem is their mods practically amount to making Minecraft's world generation a whole different game. It's nice and I quite like Better End but the mods are not very compatible with other worldgen mods and often the developers of the other mods have to put in a bunch of effort to be compatible.

@gniftygnome gniftygnome changed the title Crash on world launch 1.20 Crash on world launch 1.20 with bclib Jun 15, 2023
@quiqueck
Copy link
Contributor

quiqueck commented Jun 17, 2023

I came over because of a similar crash in our issue tracker (quiqueck/BetterNether#138). The crash happens when BCLib is trying to read the list of possibleBiomes from the Nether BiomesSource that is injected by Biolith.

When players choose the BetterX WorldPreference, we will try to get all Nether (or End) Biomes (from other Mods or Datapacks) by reading the possibleBiomes value from the active BiomeSource of the respective Dimension. This call appears to trigger this Exception:

throw new IllegalStateException("Registry manager is null during biome replacement setup!");

All this happens in BCLib when the WorldStem (SaveLoader with Yarn mappings) is first created:
https://github.com/quiqueck/BCLib/blob/f0dd0e698dfa4f015985a679f4fadf6593eb1583/src/main/java/org/betterx/worlds/together/mixin/common/WorldStem_Mixin.java#L13C1-L15

The dimension registry is ready at this point. I noticed that you initialise your RegistryManager from the same SaveLoader a bit later here:

BiomeCoordinator.setRegistryManager(combinedDynamicRegistries);

So I think the issue might easily be solved if Biolith would also get the registries from the WorldStem constructor.

@gniftygnome
Copy link
Contributor

So I think the issue might easily be solved if Biolith would also get the registries from the WorldStem constructor.

I more or less concluded the same thing (SaveLoader), but I have not had time to do it yet. I think there is a fairly good chance this will merely move things along to a difference crash, though.

quiqueck added a commit to quiqueck/Biolith that referenced this issue Jun 18, 2023
@quiqueck
Copy link
Contributor

I am confident that this will work. Contrary to what was said above, this is the only place where BCLib interacts with other BiomeSources.

In order to save you some time, I took the liberty of creating pull request that will add the needed Mixin (#5).

@gniftygnome
Copy link
Contributor

gniftygnome commented Jun 18, 2023

I am confident that this will work. Contrary to what was said above, this is the only place where BCLib interacts with other BiomeSources.

As I suspected, while the patch resolves the startup crash, there are still issues with Biolith biomes when bclib is present. Light testing indicates at the least that Cinderscapes biomes (Nether biomes placed by noise via Biolith injection into the multi-noise parameters) will only generate the first time the game is loaded. On subsequent loads, the biomes are no longer present (cannot be found and no longer generate).

In some ways, this behavior is worse, because users of our mods may install bclib and Biolith another biome mod which uses Biolth, create a new world, play it for some time, and then find after a server restart that their worlds no longer generate as expected.

@quiqueck
Copy link
Contributor

Yeah, that is definitely worse than a crash.

@itsdeadfrosty
Copy link

itsdeadfrosty commented Nov 1, 2024

I am confident that this will work. Contrary to what was said above, this is the only place where BCLib interacts with other BiomeSources.

As I suspected, while the patch resolves the startup crash, there are still issues with Biolith biomes when bclib is present. Light testing indicates at the least that Cinderscapes biomes (Nether biomes placed by noise via Biolith injection into the multi-noise parameters) will only generate the first time the game is loaded. On subsequent loads, the biomes are no longer present (cannot be found and no longer generate).

In some ways, this behavior is worse, because users of our mods may install bclib and Biolith another biome mod which uses Biolth, create a new world, play it for some time, and then find after a server restart that their worlds no longer generate as expected.

can confirm, i get biolith$getDimensionType() null with cinder and betterx mods. 20.1, custom forge x sinytra modpack

@gniftygnome
Copy link
Contributor

Biolith is not supported on Forge in 1.20.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants