
Cyanide + TFC sometimes causes worlds to not generate any foliage
SeriousCreeper opened this issue ยท 1 comments
As you may know i've been trying to figure out what causes the no foliage bug in my pack for a while now. And i'm pretty sure now that it is cyanide, as i'm able to reproduce it with just Cyanide, TFC, and Patchouli (and can not reproduce it if i remove cyanide).
Versions i'm using:
Cyanide: 2.1.1
TFC: 2.1.22
Patchouli: 71.1
Forge: 40.1.80 and 40.1.84 (tested in 2 different instances)
To reproduce do the following:
- install all the mods
- start the pack
- create a new world
- If you see trees/grass, close the pack completely, and repeat the above steps
This issue only happens sometimes, which makes me think it's an issue with the mods loading asynchronously. Sometimes it takes me just 3 tries, but it can also take 20 or more tries (which is why this was so difficult to hunt down).
But when the issue happens (your world has no foliage), any world created during that instance will not have any foliage, until you restart.
I didn't see anything special in the logs, but only glanced over them.
Latest-log: https://pastebin.com/8utgTRFy
Debug-log: https://pastebin.com/kCLg924q
Let me know if i can help with anything here.
Cheers,
SC
I've been unable to reproduce this myself. However I may have found a root cause, upon discovering a very similar issue was happening with Blueprint + TFC. My guess is that it is an interaction wherein:
- TFC uses a hack to have tag defined features, defining a single top-level
tfc:multiple
feature and then was flattening them inside ofBiomeSource#buildFeaturesPerStep
, but only if the biome source was a TFC biome source. Source - Cyanide redirects this call to
FeatureCycleDetector
, which would've excluded this from happening. Source - Blueprint does some sort of biome modification which replaces the entire biome source, and re-calls
buildFeaturesPerStep
, which would've also excluded this from happening in certain scenarios Source.
Solution? Rewrite parts of TFC to avoid any possibility of interfacing with the vanilla code, don't reference the original chunk generator biome source (as mods can taint it), don't call through the vanilla buildFeaturesPerStep
(as mods can taint it), etc. Which is the point of this commit: TerraFirmaCraft/TerraFirmaCraft@ba52818
The randomness, my guess, is occurring due to the fact these actions are not exactly synchronized - the buildFeaturesPerStep
is memoized and only invoked once needed, and the whole situation is dodgy at best. I'm closing this issue as "probably fixed", but will keep it in mind and reopen if it reoccurs.