BiomeTweaker

BiomeTweaker

13M Downloads

Semi-incompatible with Realistic World Generation

Opened this issue ยท 4 comments

commented

Hi,

PM'ed you about this earlier but will explain it again, a bit more organized.

Issue:
When using BiomeTweaks with RWG (Realistic World Generation) as generator, no biomes can be removed (Neither from BoP if (included) nor RWG itself). RWG can however be affected by BiomeTweaks, such as changing the topBlock and fillerBlock of a biome (I did that with the hotDesert biome)

When using BiomeTweaks with BoP (Biomes o Plenty) as generator, no biomes from RWG can be added.

Biomes o Plenty as generator works perfectly fine. I can remove biomes without any problems. Haven't tried the topBlock and fillerBlock changing or anything else but I suppose that works.

Couple o' links so you won't have to Google them;
RWG: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1281910-teds-world-gen-mods-realistic-world-gen-alpha-1-3
BoP: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286162-biomes-o-plenty-over-75-new-biomes-plants-and-more

Thanks again for having a look at it :)

Regards,
Exuraz

commented

I'm going to leave this here so that the author may see this.
@ted80

commented

The issue is located in this method:

https://github.com/Ted80-Minecraft-Mods/Better-World-Generation-4/blob/master/bwg4/world/ChunkManagerRealistic.java#L142

Whereas the vanilla method consults the BiomeManager for biomes, RWG's method does not. Vanilla method is detailed below:

IntCache.resetIntCache();

    if (p_76937_1_ == null || p_76937_1_.length < p_76937_4_ * p_76937_5_)
    {
        p_76937_1_ = new BiomeGenBase[p_76937_4_ * p_76937_5_];
    }

    int[] aint = this.genBiomes.getInts(p_76937_2_, p_76937_3_, p_76937_4_, p_76937_5_);

    try
    {
        for (int i1 = 0; i1 < p_76937_4_ * p_76937_5_; ++i1)
        {
            p_76937_1_[i1] = BiomeGenBase.getBiome(aint[i1]);
        }

        return p_76937_1_;
    }

The crucial call is

int[] aint = this.genBiomes.getInts(p_76937_2_, p_76937_3_, p_76937_4_, p_76937_5_);

This conults the GenLayer class, which, when instantiated, consults the BiomeManager. GenLayer asks the BiomeManager for biomes when it is instantiated:

for (BiomeManager.BiomeType type : BiomeManager.BiomeType.values())
    {
        com.google.common.collect.ImmutableList<BiomeEntry> biomesToAdd = BiomeManager.getBiomes(type);
        int idx = type.ordinal();

        if (biomes[idx] == null) biomes[idx] = new ArrayList<BiomeEntry>();
        if (biomesToAdd != null) biomes[idx].addAll(biomesToAdd);
    }

The fix for this issue will not be easy from an outside source. The options are to either ask the author to consult the BiomeManager, or to use ASM to directly modify the method. I will probably ask the author before resorting to ASM.

commented

Alright, seems quite complicated from a non-Java dev perspective.but I suppose RWG is still in alpha as well so incompatibility can be expected. Already happy I can make some changes to the biomes using BiomeTweaker :)

Don't suppose he'll respond to this since I already PM'ed him about something else regarding compatibility and he just ignored me, and he doesn't seem to be replying to posts on his mod thread either but perhaps he'll make it compatible with BiomeTweaker anyway.

Anyways, thanks for the help.

commented

That's unfortunate. I'm going to add a known bugs and incompatibilities section.

This issue will stay open for a while - until it seems as though the author of RWG will not respond.