• 0

    posted a message on [1.12.2] How to override a specific biomes generation?

    So im making a custom world type where only islands generate basically, and the way I did this is by making as custom GenLayerBiome class and every biome that is WARM, ICY, COOL or a DESERT (Already empty but whatever) and replace it with my biomes and it works for the most part

    but the issue im facing is certain biomes such as jungle, red taiga, etc are their own type and I can't figure out how to change those biomes

    Here's a snippet of the code i'm using

    int idx = BiomeType.DESERT.ordinal();
            biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
            biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
            idx = BiomeType.WARM.ordinal();
            biomes[idx].clear();
            biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
            biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
            idx = BiomeType.COOL.ordinal();
            biomes[idx].clear();
            biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
            biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
            idx = BiomeType.ICY.ordinal();
            biomes[idx].clear();
            biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
            biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
    
            if (p_i45560_4_ == WorldType.DEFAULT_1_1)
            {
            	Biome biome;
                biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
                biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
                idx = BiomeType.WARM.ordinal();
                biomes[idx].clear();
                biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
                biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
                idx = BiomeType.COOL.ordinal();
                biomes[idx].clear();
                biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
                biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));
                idx = BiomeType.ICY.ordinal();
                biomes[idx].clear();
                biomes[idx].add(new BiomeEntry(BiomeInit.MODISLAND, (int) 0.5));
                biomes[idx].add(new BiomeEntry(Biomes.OCEAN, 15));              
                this.settings = null;
            }


    Again the issue with this is that jungle and red taiga biome's (and more) are not in any of these types

    So, I Tried to make the idx variable a jungle biome like so

    idx = Biomes.JUNGLE;

     
    But idx is an int so it didn't work

    So I made a new value that's a biome and tried using that

    Biome biome;
                biome = Biomes.JUNGLE;
                biomes[biome].clear();
                biomes[biome].add(new BiomeEntry(BiomeInit.MODISLAND, 1));
                biomes[biome].add(new BiomeEntry(Biomes.OCEAN, 30));

     
    but that didn't work either as it told me to turn it back to an int

    So i'm a bit lost, is there anyway to do this?
    Any help is greatly appreciated!

     

    Posted in: Mod Development
  • To post a comment, please or register a new account.