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

Restore 0.6.x Biomes o' Plenty sub-biome generation #7

Conversation

not-nocturnal
Copy link

This re-adds the 0.6.x code that was removed as a hard fix for the gigantic tropical landmasses, allowing Biomes o' Plenty sub-biomes to generate again (assuming the user enables them in their config).

This also adds a check when generating Biomes o' Plenty sub-biomes to see if the parent biome is deep ocean, in which case it nulls the list of sub-biomes for the biome, preventing the tropical landmasses. This removes the need for the user to manually disable tropics, volcano and mangrove as sub-biomes in the Biomes o' Plenty mod's config files like with 0.6.x.

There is, however, a concern that if a user of a 0.8.4-based version (including our 0.9.x) has BoP sub-biomes enabled in their config, and upgrades to a new version with these changes, they will likely end up seeing some chunk wall issues in any partially-explored biomes that are now able to generate BoP sub-biomes (as per their config). This would probably warrant some kind of warning for anyone intending to upgrade their CC version.

@Dream-Master Dream-Master requested a review from a team May 26, 2024 13:50
Comment on lines +45 to +53
try {
if (doBoP) {
BoPSubBiomeReplacer = new BoPSubBiomeReplacer(randomCallback);
logger.info("Bop set up");
}
} catch (java.lang.NoClassDefFoundError e) {
BoPSubBiomeReplacer = null;
logger.info("no bop ");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with a cached Loader.isModLoaded check

Copy link
Author

@not-nocturnal not-nocturnal May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you be able to point me to an example of that? I'm not very familiar with java/mc modding.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firstly, create static field and initialize it at pre-init phase:

    private static boolean isBoPLoaded;
    // then at pre-init:
    isBoPLoaded =  = Loader.isModLoaded("BiomesOPlenty");

Secondly, replace this code with:

Suggested change
try {
if (doBoP) {
BoPSubBiomeReplacer = new BoPSubBiomeReplacer(randomCallback);
logger.info("Bop set up");
}
} catch (java.lang.NoClassDefFoundError e) {
BoPSubBiomeReplacer = null;
logger.info("no bop ");
}
if (isBoPLoaded && doBoP) {
BoPSubBiomeReplacer = new BoPSubBiomeReplacer(randomCallback);
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @not-nocturnal do you want to finish up this PR so it can be accepted please?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, this ended up being too much for me to get my head around and i burned out trying to finish it

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, this ended up being too much for me to get my head around and i burned out trying to finish it

just the check? or what were you stuck on?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just the check, but it's been a very long time and i feel very out of depth

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OneEyeMaker would you like to pick this up?

@serenibyss
Copy link
Member

Closing in favor of #8

@serenibyss serenibyss closed this Dec 27, 2024
@not-nocturnal not-nocturnal deleted the 0.9.3-BoP-subbiomes-fix branch February 25, 2025 11:51
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

Successfully merging this pull request may close these issues.

5 participants