-
Notifications
You must be signed in to change notification settings - Fork 2
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
Restore 0.6.x Biomes o' Plenty sub-biome generation #7
Conversation
try { | ||
if (doBoP) { | ||
BoPSubBiomeReplacer = new BoPSubBiomeReplacer(randomCallback); | ||
logger.info("Bop set up"); | ||
} | ||
} catch (java.lang.NoClassDefFoundError e) { | ||
BoPSubBiomeReplacer = null; | ||
logger.info("no bop "); | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
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); | |
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Closing in favor of #8 |
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.