Gaia Dimension

Gaia Dimension

762k Downloads

Biomes o plenty biomes override Gaia's world generation on server

Vlad5435 opened this issue · 18 comments

commented

I am using biomes o plenty as well as a decently large quantity of other mods along with the Gaia dimension mod. I am able to access this dimension and see normal world generation in single player but once I try it on my server it essentially only generates BoP biomes in the dimension. I have tried porting over the world file's Gaia dimension from a single player world onto the server but have had no luck. I'm wondering if there's anything I could try that you could think of or a potential fix to this. If you want my full moldlist it is the following:

BiomesOPlenty-1.16.4-13.0.0.420-universal.jar
Hornets-0.0.1.jar
HostileWaterMonsters-1.16.3-1.16.3-1.1.0.4.jar  
Ma-Enchants-1.16.3-3.5.0.jar
Neat+1.7-24.jar
RingsOfAscension-1.16.3-1.5.6.jar
SBM-Merpig-1.16.3-0.0.1.jar
The_Undergarden-1.16.3-0.3.8.jar
UnionLib-1.16.4-3.1.1.jar
Waystones_1.16.3-7.3.1.jar
Wyrmroost-1.16.3-1.2.7.jar
citadel-1.5.0.jar
curios-forge-1.16.4-4.0.2.1.jar
dungeons-plus-1.16.3-1.0.3.jar  
farlanders-1.16.3-1.3.4.jar
froglins-1.16.3-1.0.1.3.jar  
gaiadimension-1.16.4-1.3.0.jar  
goblintraders-1.2.2-1.16.3.jar  
iceandfire-2.1.1-1.16.3.jar
illagersweararmor-1.0.3.jar
jei-1.16.4-7.6.0.53.jar
mermaidtail-1.4.jar
pandoras_creatures-1.16.3-2.0.1.jar 
scuba-gear-1.16.4-1.0.1.jar
structure-gel-api-1.16.3-1.6.0.jar  
valhelsia_structures-16.0.5.jar

commented

So fresh world gen obvious no issue. I had this issue creep up after I added Dungeons Plus, which adds Structure Gel Mod. This is what happens in the console that may have caused an issue. This is further linked by the fact that the biomes that are displacing the Gaia biomes are from good nights sleep and bumble zone. Might be worth reaching out to the Structure Gel Mod author.

09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:dreamy_forest to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:goldstone_lands to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:static_wasteland to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:mutant_agate_wildwood to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:wasted_forest to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:volcanic_lands to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:purple_agate_swamp to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered jellyfishing:jellyfish_fields to structure_gel:[dirty, ocean, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:hopeful_fields to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:lollipop_lands to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:crystal_plains to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:good_dream_plains to structure_gel:[neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:fossil_woodland to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:green_agate_jungle to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:smoldering_bog to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered the_bumblezone:sugar_water_floor to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:salt_dunes to structure_gel:[sandy, dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:shining_grove to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:shameful_plains to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:mineral_reservoir to structure_gel:[sandy, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:nightmare_hills to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:pink_agate_forest to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:blue_agate_taiga to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered the_bumblezone:hive_wall to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered the_bumblezone:hive_pillar to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered good_nights_sleep:sleepy_hills to structure_gel:[dry, neutral_temp] 09.12 11:06:29 [Server] modloading-worker-1/INFO [co.le.st.StructureGelMod/]: Registered gaiadimension:mineral_river to structure_gel:[sandy, river, neutral_temp]

commented

From what I can get at, they are registering biome tags, which I would assume isn't the cause.
If anything, what I'm trying to look for is distortions in the biome registry. As this issue does not occur in freshly generated worlds, it is definitely an issue with the biome registry per world. What I could try is having a config for "debug" lines (they display in normal logging) that print on world load, comparing the biomes (and the key) to the integer ID in the biome provider. Issue with this is that the bug needs to be actively tracked when the option is enabled. No idea if it will help.

commented

I have decided to attempt reproduction of this issue, each test was a new world.

The first test was a clean instance with only BYG, then adding Gaia Dimension. Said bug did not surface, even when running /locatebiome to find any discrepancies.

However, the second test replicated the bug. Starting with Gaia Dimension in a clean instance, I then added BYG in, and once I loaded back into the world, the Blue Agate Taiga I was standing in became Alps from BYG.

It does not seem like this bug is on my end, as the first test indicates that adding Gaia Dimension into an existing world caused it. That being said, I will be keeping this issue open in the event someone is able to surface this bug with Gaia Dimension added to an existing world. This may need more testing with other mods, but I am only one developer.

commented

For your second test, were you using Forge 1.16.3-34.1.42 or newer?

=========
Build: 1.16.3-34.1.42 - Mon Nov 02 04:30:53 GMT 2020
	lex:
		Fix Biomes not properly copying over ids loaded from the save to the new Dynamic Registry.

The biome ID shifting when added new mods was supposedly fixed by Lex. if this is reproducible on current forge, please let Lex know his fix was not complete.

commented

Nvm. Found the issue.

return this.genBiomes.func_242936_a(registry, x, z);

That method called is this:


   public Biome func_242936_a(Registry<Biome> p_242936_1_, int p_242936_2_, int p_242936_3_) {
      int i = this.field_215742_b.getValue(p_242936_2_, p_242936_3_);
      RegistryKey<Biome> registrykey = BiomeRegistry.getKeyFromID(i);
      if (registrykey == null) {
         throw new IllegalStateException("Unknown biome id emitted by layers: " + i);
      } else {
         Biome biome = p_242936_1_.getValueForKey(registrykey);
         if (biome == null) {
            if (SharedConstants.developmentMode) {
               throw (IllegalStateException)Util.pauseDevMode(new IllegalStateException("Unknown biome id: " + i));
            } else {
               LOGGER.warn("Unknown biome id: ", (int)i);
               return p_242936_1_.getValueForKey(BiomeRegistry.getKeyFromID(0));
            }
         } else {
            return biome;
         }
      }
   }

Emphasis on BiomeRegistry.getKeyFromID(i);
That's using the worldgenregistry and will only work for vanilla biomes. Modded biomes will shift in ID and stuff and so that registry will die for modded/datapack biomes.

The solution I done was make my own func_242936_a method (called sample in yarn so I named it the same) and in that, I use the dynamicregistry to turn the biome id into the correct biome. The field field_215742_b (called sampler) is private and I used an accessor mixin to get it. You can use an AT to get it from this.genBiomes to get the biome id from the layer sampler and then safely convert it to the actual biome
https://github.com/TelepathicGrunt/Bumblezone/blob/07444900a6215051433903a4b18ed18c1fd1b2ad/src/main/java/com/telepathicgrunt/the_bumblezone/generation/BzBiomeProvider.java#L118-L130

commented

No luck on that front, unfortunately. I created a build using 5ea3b20 and 43a61af, but the issue still came back when replicating the second test. The affected biomes only appear to be in existing chunks, but as probably to be expected, new chunks appear to generate just fine.

One bit of info that might be worth noting is that a similar issue also occurred with a dev version of Twilight Forest, however it is at a stage where the biomes are laid out using vanilla biome providers, so there's little control over what generates.

commented

Unfortunately, I've not been able to resolve this in my end. Considering other dimension mods are affected by this - even dimensions that are entirely made in a datapack - this doesn't appear to be my issue anymore.
If anyone is able to find definitive evidence this is a problem I can resolve on my end, feel free to come forward with some code examples. Otherwise, this is no longer an issue for Gaia Dimension.

commented

I have a similar problem, not the same but I think they are related. I am not using BOP, mainly because I have had it cause to many issues with mods that add dimensions and biomes, but Oh the Boimes You'll go. I have not yet tried to go to the actual dimension, but I noticed that the biomes that you create conflict with obyg biomes and "bleed" into the overworld. The world gen would be correct, but the biome and filters/blending would be what I assume to be one from your mod. This is probably a separate issue, but it could also be related so I figured I would add it here. BTW if I disable your mod the biomes are labled and filtered correctly in the overworld. Also I noticed that the FTB Map would go white, though that could be because the biomes are labeled wrong and it cannot figure out how to render.

commented

Honestly, I'm at a loss as to why this is happening. The biome provider for Gaia should not be accepting other biomes.

commented

I'll call it similar anyway, however it sounds more like they're taking my biomes as I don't touch the overworld's worldgen in any way.

commented

This issue occurs when biome mods are added/removed I'm going to assume.

commented

I do this in BYG to try and prevent the shuffling of biome ID's when adding biomes to my mod and preserving worlds across updates: https://github.com/CorgiTaco/BYG/blob/Forge-1.16.X/src/main/java/corgiaoc/byg/core/world/BYGBiomes.java , https://github.com/CorgiTaco/BYG/blob/Forge-1.16.X/src/main/java/corgiaoc/byg/core/world/BYGBiomes.java#L336-L353 ,
https://github.com/CorgiTaco/BYG/blob/Forge-1.16.X/src/main/java/corgiaoc/byg/core/world/util/WorldGenRegistrationHelper.java#L130 ,
https://github.com/CorgiTaco/BYG/blob/Forge-1.16.X/src/main/java/corgiaoc/byg/BYG.java#L148-L149

But I believe this is a result of the dynamic registries :/

But then again, will not resolve the issue of a user adding/removing mods or if another mod adds new biomes and it pushes my biome ids up 1 or 2 spaces the issue will occur. @Vlad5435 / @Andromander could we get a picture of you being in the biome that is "overriding"? Also idk if these mixins could be at fault on my side, but: https://github.com/CorgiTaco/BYG/blob/Forge-1.16.X/src/main/java/corgiaoc/byg/mixin/common/world/layers/MixinDimensionType.java

Hope this helps with the little bit I know :)

commented

I was afraid 1.16's new systems may have caused something, but nonetheless, I'll have a look at this a little later.
I also appreciate the help, even if it is just a little bit.

commented

I think, ultimately, if this issue cannot be reproduced in a new world or cannot be reproduced on a new profile with no change to the mod list (ie. no mods were added or removed since the profile was run), it may just come down to an issue with dynamic registries. My hunch when I first saw this report was that biome IDs were shifted, because the screenshot provided showed a cut-off chunk edge, indicating a modification of the mod list for an existing world.
However, if it is able to be reproduced in a new world, I'll need a lot of detail, such as Forge version, Minecraft version, full mod list, perhaps a latest.log (though it might not say anything). As mentioned above, I don't touch other dimensions, and other dimensions shouldn't be yanking my biomes under normal circumstances. Also, worth deleting the dimension and reloading it again to see if biomes still bleed in, though shifted IDs might still cause issues.

@CorgiTaco I wouldn't say those Mixins would be affecting my dimension as those appear to just touch Nether and End chunk generators. Worst comes to worst, I'll have a look at implementing something similar for Gaia. Though, as you said, this could be a fault of dynamic registries, so the easiest solution for players is to back worlds up first when mods are added/removed.

commented

You should add some code to print out the dimension’s biome provider class and registry name. See if your dimension’s biome provider was completely replaced or not. The code you have for the biome provider looks fine on my end as you do use the dynamic registry everywhere I look.

commented

Most likely just a note on this issue itself.

As stated myself a few times, I don't touch other dimensions and, theoretically, other dimensions shouldn't be touching mine. At least, in normal circumstances. There is a possibility of a clash, but I don't have reliable reproduction steps.

In terms of this bug appearing with other dimensions, I have heard something similar occur with a development version of Twilight Forest on 1.16.4. Unlike Gaia, TF is using the checkerboard chunk generator for the time being. In it, they report other mods generating in the TF dimension, and generated biomes had changed. I notified a Forge dev of this issue when I caught this, and they theorise that it could be an issue of some form of invasive worldgen or registration. Worth noting that the user had put in mods to an existing world, but a new world is completely fine.

I'm uncertain of the actual cause of this issue as it's still being investigated. Will try looking into creating a sort of "debug" Gaia Dimension that prints out what biomes are or should be generating, as well as what is doing the generation (ie. is it GaiaBiomeProvider, or is it being overridden). For now, I'm labelling this issue as a potential issue with other software.

commented

Is there anyway to fix this that doesn't constitute scrapping the world and starting again? I just had this happen after updating mods and adding them on a server as well. To my knowledge there was no mod added that would have added biomes but, I'm wondering if I can fix this.

commented

Has anyone looked at Structure Gel API? It seems it does something with a biome dict and this is the only mod I added that seems to touch the biomes. I'm trying to confirm but creating a new instance and then adding it but, i'm leaning towards this being a part of the issue.