Jump to content

Custom Biomes not Generating Properly


Andrew Murdza

Recommended Posts

I recently successfully replaced the vanilla minecraft biomes with my custom biomes.

I got everything to work perfectly except for some reason cacti and dead bushes did not spawn in the desert biome.

I tried tinkering with my code and now none of the biomes generate properly. The problem is that all of the biomes use oak trees rather than the native tree and the desert still doesn't have cacti or dead bushes (which is less important, the trees are much more important). At the same time, I get the message MyMod loaded a new chunk [23, 17] in dimension 0 (overworld) while populating chunk [23, 16], causing cascading worldgen lag. This message is described in Jabelar's minecraft biome modding tutorial which occurs when one chunk loads the next chunk and so on. I know that it is usually avoided by adding a +8 the position where blocks that are generated. I did not add anything that would require an additional +8 or remove any +8 though.

 

The class that edited the most was the BiomesNew class. The way that I edited it caused some biomes to be reigstered more than once (I was trying to get rid of Desert_Mutated by replacing it with Desert, I did similar things for many other biomes). I think this is what is causing the problem. I changed the classes back to the way before but I think the old duplicate biomes may still be registered. One reason that I think this is the cause is because when I changed BiomeDesertNew to extend Biome instead of BiomeNew I got the same cascading effect when I entered a Desert biome in the past. This is the BiomesNew class:


 

package com.amurdza.mymod.biomes;

import java.util.HashMap;

import com.amurdza.mymod.biomes.biomes.*;

import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeHills;
import net.minecraft.world.biome.BiomeForest;
import net.minecraft.world.biome.BiomeTaiga;
import net.minecraft.world.biome.BiomeEnd;
import net.minecraft.world.biome.BiomeHell;
import net.minecraft.world.biome.BiomeVoid;

public class BiomesNew {

    //Ocean
    public static final Biome OCEAN = new BiomeOceanNew((new Biome.BiomeProperties("Ocean")).setBaseHeight(-1.0F).setHeightVariation(0.1F)).setRegistryName("ocean");
    public static final Biome DEFAULT = OCEAN;
    public static final Biome DEEP_OCEAN = new BiomeOceanNew((new Biome.BiomeProperties("Deep Ocean")).setBaseHeight(-1.8F).setHeightVariation(0.1F)).setRegistryName("Deep Ocean");
    public static final Biome FROZEN_OCEAN = new BiomeOceanNew((new Biome.BiomeProperties("FrozenOcean")).setBaseHeight(-1.0F).setHeightVariation(0.1F).setTemperature(0.0F).setRainfall(0.5F).setSnowEnabled()).setRegistryName("FrozenOcean");

    //Beach
    public static final Biome BEACH = new BiomeBeachNew((new Biome.BiomeProperties("Beach")).setBaseHeight(0.0F).setHeightVariation(0.025F).setTemperature(0.8F).setRainfall(0.4F)).setRegistryName("Beach");
    public static final Biome STONE_BEACH = new BiomeStoneBeachNew((new Biome.BiomeProperties("Stone Beach")).setBaseHeight(0.1F).setHeightVariation(0.8F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Stone Beach");
    public static final Biome COLD_BEACH = new BiomeBeachNew((new Biome.BiomeProperties("Cold Beach")).setBaseHeight(0.0F).setHeightVariation(0.025F).setTemperature(0.05F).setRainfall(0.3F).setSnowEnabled()).setRegistryName("Cold Beach");

    //Jungle
    public static final Biome JUNGLE = new BiomeJungleNew(false, (new Biome.BiomeProperties("Jungle")).setTemperature(0.95F).setRainfall(0.9F)).setRegistryName("Jungle");
    public static final Biome JUNGLE_HILLS = new BiomeJungleNew(false, (new Biome.BiomeProperties("JungleHills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(0.95F).setRainfall(0.9F)).setRegistryName("JungleHills");
    public static final Biome JUNGLE_EDGE = new BiomeJungleNew(true, (new Biome.BiomeProperties("JungleEdge")).setTemperature(0.95F).setRainfall(0.8F)).setRegistryName("JungleEdge");
    public static final Biome MUTATED_JUNGLE = new BiomeJungleNew(false, (new Biome.BiomeProperties("Jungle M")).setBaseBiome("jungle").setBaseHeight(0.2F).setHeightVariation(0.4F).setTemperature(0.95F).setRainfall(0.9F)).setRegistryName("Jungle M");;
    public static final Biome MUTATED_JUNGLE_EDGE = new BiomeJungleNew(true, (new Biome.BiomeProperties("JungleEdge M")).setBaseBiome("jungle_edge").setBaseHeight(0.2F).setHeightVariation(0.4F).setTemperature(0.95F).setRainfall(0.8F)).setRegistryName("Jungle Edge M");;
    
    //Hills
    public static final Biome EXTREME_HILLS_WITH_TREES = new BiomeHillsNew(BiomeHills.Type.EXTRA_TREES, (new Biome.BiomeProperties("Extreme Hills+")).setBaseHeight(1.0F).setHeightVariation(0.5F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Extreme Hills +");
    public static final Biome MUTATED_EXTREME_HILLS = new BiomeHillsNew(BiomeHills.Type.MUTATED, (new Biome.BiomeProperties("Extreme Hills M")).setBaseBiome("extreme_hills").setBaseHeight(1.0F).setHeightVariation(0.5F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Extreme Hills M");
    public static final Biome MUTATED_EXTREME_HILLS_WITH_TREES = new BiomeHillsNew(BiomeHills.Type.MUTATED, (new Biome.BiomeProperties("Extreme Hills+ M")).setBaseBiome("extreme_hills_with_trees").setBaseHeight(1.0F).setHeightVariation(0.5F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Extreme Hills+ M");
    public static final Biome EXTREME_HILLS = new BiomeHillsNew(BiomeHills.Type.NORMAL, (new Biome.BiomeProperties("Extreme Hills")).setBaseHeight(1.0F).setHeightVariation(0.5F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Extreme Hills");
    public static final Biome EXTREME_HILLS_EDGE = new BiomeHillsNew(BiomeHills.Type.EXTRA_TREES, (new Biome.BiomeProperties("Extreme Hills Edge")).setBaseHeight(0.8F).setHeightVariation(0.3F).setTemperature(0.2F).setRainfall(0.3F)).setRegistryName("Extreme Hills Edge");


    //Plains    
    public static final Biome PLAINS = new BiomePlainsNew(false, (new Biome.BiomeProperties("Plains")).setBaseHeight(0.125F).setHeightVariation(0.05F).setTemperature(0.8F).setRainfall(0.4F)).setRegistryName("Plains");
    public static final Biome MUTATED_PLAINS = new BiomePlainsNew(true, (new Biome.BiomeProperties("Sunflower Plains")).setBaseBiome("plains").setBaseHeight(0.125F).setHeightVariation(0.05F).setTemperature(0.8F).setRainfall(0.4F)).setRegistryName("Sunflower Plains");

    
    
    //Miscellaneous
    public static final Biome HELL= new BiomeHell((new Biome.BiomeProperties("Hell")).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Nether");
    public static final Biome SKY = new BiomeEnd((new Biome.BiomeProperties("The End")).setRainDisabled()).setRegistryName("The End");
    public static final Biome VOID = new BiomeVoid((new Biome.BiomeProperties("The Void")).setRainDisabled()).setRegistryName("The Void");


    //Desert
    public static final Biome DESERT = new BiomeDesertNew((new Biome.BiomeProperties("Desert")).setBaseHeight(0.125F).setHeightVariation(0.05F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Desert");
    public static final Biome MUTATED_DESERT = new BiomeDesertNew((new Biome.BiomeProperties("Desert M")).setBaseBiome("desert").setBaseHeight(0.225F).setHeightVariation(0.25F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Desert M");
    public static final Biome DESERT_HILLS = new BiomeDesertNew((new Biome.BiomeProperties("DesertHills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("DesertHills");


    //Swamp
    public static final Biome SWAMPLAND = new BiomeSwampNew((new Biome.BiomeProperties("Swampland")).setBaseHeight(-0.2F).setHeightVariation(0.1F).setTemperature(0.8F).setRainfall(0.9F).setWaterColor(14745518)).setRegistryName("Swampland");
    public static final Biome MUTATED_SWAMPLAND = new BiomeSwampNew((new Biome.BiomeProperties("Swampland M")).setBaseBiome("swampland").setBaseHeight(-0.1F).setHeightVariation(0.3F).setTemperature(0.8F).setRainfall(0.9F).setWaterColor(14745518)).setRegistryName("Swampland M");
    //Roofed Forest
    public static final Biome ROOFED_FOREST = new BiomeForestNew(BiomeForest.Type.ROOFED, (new Biome.BiomeProperties("Roofed Forest")).setTemperature(0.7F).setRainfall(0.8F)).setRegistryName("Roofed Forest");
    public static final Biome MUTATED_ROOFED_FOREST = new BiomeForestNew(BiomeForest.Type.ROOFED, (new Biome.BiomeProperties("Roofed Forest M")).setBaseBiome("roofed_forest").setBaseHeight(0.2F).setHeightVariation(0.4F).setTemperature(0.7F).setRainfall(0.8F)).setRegistryName("Roofed Forest M");
    
    //Forest
    public static final Biome FOREST = new BiomeForestNew(BiomeForest.Type.NORMAL, (new Biome.BiomeProperties("Forest")).setTemperature(0.7F).setRainfall(0.8F)).setRegistryName("Forest");
    public static final Biome MUTATED_FOREST = new BiomeForestNew(BiomeForest.Type.FLOWER, (new Biome.BiomeProperties("Flower Forest")).setBaseBiome("forest").setHeightVariation(0.4F).setTemperature(0.7F).setRainfall(0.8F)).setRegistryName("Flower Forest");
    public static final Biome FOREST_HILLS = new BiomeForestNew(BiomeForest.Type.NORMAL, (new Biome.BiomeProperties("ForestHills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(0.7F).setRainfall(0.8F)).setRegistryName("ForestHills");
    
    //Birch Forest
    public static final Biome BIRCH_FOREST = new BiomeForestNew(BiomeForest.Type.BIRCH, (new Biome.BiomeProperties("Birch Forest")).setTemperature(0.6F).setRainfall(0.6F)).setRegistryName("Birch Forest");
    public static final Biome MUTATED_BIRCH_FOREST = new BiomeForestMutatedNew((new Biome.BiomeProperties("Birch Forest M")).setBaseBiome("birch_forest").setBaseHeight(0.2F).setHeightVariation(0.4F).setTemperature(0.6F).setRainfall(0.6F)).setRegistryName("Birch Forest M");
    public static final Biome MUTATED_BIRCH_FOREST_HILLS = new BiomeForestMutatedNew((new Biome.BiomeProperties("Birch Forest Hills M")).setBaseBiome("birch_forest_hills").setBaseHeight(0.55F).setHeightVariation(0.5F).setTemperature(0.6F).setRainfall(0.6F)).setRegistryName("Birch Forest Hils M");
    public static final Biome BIRCH_FOREST_HILLS = new BiomeForestNew(BiomeForest.Type.BIRCH, (new Biome.BiomeProperties("Birch Forest Hills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(0.6F).setRainfall(0.6F)).setRegistryName("Birch Forest Hills");
    
    //Snow
    public static final Biome ICE_PLAINS = new BiomeSnowNew(false, (new Biome.BiomeProperties("Ice Plains")).setBaseHeight(0.125F).setHeightVariation(0.05F).setTemperature(0.0F).setRainfall(0.5F).setSnowEnabled()).setRegistryName("Ice Plains");
    public static final Biome ICE_MOUNTAINS = new BiomeSnowNew(false, (new Biome.BiomeProperties("Ice Mountains")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(0.0F).setRainfall(0.5F).setSnowEnabled()).setRegistryName("Ice Mountains");
    public static final Biome MUTATED_ICE_FLATS = new BiomeSnowNew(true, (new Biome.BiomeProperties("Ice Plains Spikes")).setBaseBiome("ice_flats").setBaseHeight(0.425F).setHeightVariation(0.45000002F).setTemperature(0.0F).setRainfall(0.5F).setSnowEnabled()).setRegistryName("Ice Plains Spikes");
    
    //River
    public static final Biome RIVER = new BiomeRiverNew((new Biome.BiomeProperties("River")).setBaseHeight(-0.5F).setHeightVariation(0.0F)).setRegistryName("River");
    public static final Biome FROZEN_RIVER = new BiomeRiverNew((new Biome.BiomeProperties("FrozenRiver")).setBaseHeight(-0.5F).setHeightVariation(0.0F).setTemperature(0.0F).setRainfall(0.5F).setSnowEnabled()).setRegistryName("FrozenRiver");

    //Taiga
    public static final Biome TAIGA = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("Taiga")).setBaseHeight(0.2F).setHeightVariation(0.2F).setTemperature(0.25F).setRainfall(0.8F)).setRegistryName("taiga");
    public static final Biome TAIGA_HILLS = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("TaigaHills")).setTemperature(0.25F).setRainfall(0.8F).setBaseHeight(0.45F).setHeightVariation(0.3F)).setRegistryName("TaigaHills");
    public static final Biome MUTATED_TAIGA = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("Taiga M")).setBaseBiome("taiga").setBaseHeight(0.3F).setHeightVariation(0.4F).setTemperature(0.25F).setRainfall(0.8F)).setRegistryName("Taiga M");;

    //Mushroom Island
    public static final Biome MUSHROOM_ISLAND = new BiomeMushroomIslandNew((new Biome.BiomeProperties("MushroomIsland")).setBaseHeight(0.2F).setHeightVariation(0.3F).setTemperature(0.9F).setRainfall(1.0F)).setRegistryName("MushroomIsland");
    public static final Biome MUSHROOM_ISLAND_SHORE = new BiomeMushroomIslandNew((new Biome.BiomeProperties("MushroomIslandShore")).setBaseHeight(0.0F).setHeightVariation(0.025F).setTemperature(0.9F).setRainfall(1.0F)).setRegistryName("MushroomIslandShore");

    //Cold Taiga
    public static final Biome COLD_TAIGA = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("Cold Taiga")).setBaseHeight(0.2F).setHeightVariation(0.2F).setTemperature(-0.5F).setRainfall(0.4F).setSnowEnabled()).setRegistryName("Cold Taiga");
    public static final Biome COLD_TAIGA_HILLS = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("Cold Taiga Hills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(-0.5F).setRainfall(0.4F).setSnowEnabled()).setRegistryName("Cold Taiga Hills");
    public static final Biome MUTATED_TAIGA_COLD = new BiomeTaigaNew(BiomeTaiga.Type.NORMAL, (new Biome.BiomeProperties("Cold Taiga M")).setBaseBiome("taiga_cold").setBaseHeight(0.3F).setHeightVariation(0.4F).setTemperature(-0.5F).setRainfall(0.4F).setSnowEnabled()).setRegistryName("Cold Taiga M");;
    
    //Red Wood Taiga
    public static final Biome MUTATED_REDWOOD_TAIGA = new BiomeTaigaNew(BiomeTaiga.Type.MEGA_SPRUCE, (new Biome.BiomeProperties("Mega Spruce Taiga")).setBaseBiome("redwood_taiga").setBaseHeight(0.2F).setHeightVariation(0.2F).setTemperature(0.25F).setRainfall(0.8F)).setRegistryName("Mega Spruce Taiga");
    public static final Biome MUTATED_REDWOOD_TAIGA_HILLS = new BiomeTaigaNew(BiomeTaiga.Type.MEGA_SPRUCE, (new Biome.BiomeProperties("Redwood Taiga Hills M")).setBaseBiome("redwood_taiga_hills").setBaseHeight(0.2F).setHeightVariation(0.2F).setTemperature(0.25F).setRainfall(0.8F)).setRegistryName("Mega Spruce Taiga Hills");
    public static final Biome REDWOOD_TAIGA = new BiomeTaigaNew(BiomeTaiga.Type.MEGA, (new Biome.BiomeProperties("Mega Taiga")).setTemperature(0.3F).setRainfall(0.8F).setBaseHeight(0.2F).setHeightVariation(0.2F)).setRegistryName("Mega Taiga");
    public static final Biome REDWOOD_TAIGA_HILLS = new BiomeTaigaNew(BiomeTaiga.Type.MEGA, (new Biome.BiomeProperties("Mega Taiga Hills")).setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(0.3F).setRainfall(0.8F)).setRegistryName("Mega Taiga Hills");
    
    //Savanna
    public static final Biome SAVANNA = new BiomeSavannaNew((new Biome.BiomeProperties("Savanna")).setBaseHeight(0.125F).setHeightVariation(0.05F).setTemperature(1.2F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Savanna");
    public static final Biome SAVANNA_PLATEAU = new BiomeSavannaNew((new Biome.BiomeProperties("Savanna Plateau")).setBaseHeight(1.5F).setHeightVariation(0.025F).setTemperature(1.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Savanna Plateau");
    
    public static final Biome MUTATED_SAVANNA = new BiomeSavannaMutatedNew((new Biome.BiomeProperties("Savanna M")).setBaseBiome("savanna").setBaseHeight(0.3625F).setHeightVariation(1.225F).setTemperature(1.1F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Savanna M");
    public static final Biome MUTATED_SAVANNA_ROCK = new BiomeSavannaMutatedNew((new Biome.BiomeProperties("Savanna Plateau M")).setBaseBiome("savanna_rock").setBaseHeight(1.05F).setHeightVariation(1.2125001F).setTemperature(1.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Savanna Plateau M");
    
    //Mesa
    public static final Biome MESA = new BiomeMesaNew(false, false, (new Biome.BiomeProperties("Mesa")).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa");;
    public static final Biome MESA_ROCK = new BiomeMesaNew(false, true, (new Biome.BiomeProperties("Mesa Plateau F")).setBaseHeight(1.5F).setHeightVariation(0.025F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa Plateau F");;
    public static final Biome MESA_CLEAR_ROCK = new BiomeMesaNew(false, false, (new Biome.BiomeProperties("Mesa Plateau")).setBaseHeight(1.5F).setHeightVariation(0.025F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa Plateau");
    public static final Biome MUTATED_MESA = new BiomeMesaNew(true, false, (new Biome.BiomeProperties("Mesa (Bryce)")).setBaseBiome("mesa").setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa Bryce");
    public static final Biome MUTATED_MESA_ROCK = new BiomeMesaNew(false, true, (new Biome.BiomeProperties("Mesa Plateau F M")).setBaseBiome("mesa_rock").setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa Plateau F M");
    public static final Biome MUTATED_MESA_CLEAR_ROCK = new BiomeMesaNew(false, false, (new Biome.BiomeProperties("Mesa Plateau M")).setBaseBiome("mesa_clear_rock").setBaseHeight(0.45F).setHeightVariation(0.3F).setTemperature(2.0F).setRainfall(0.0F).setRainDisabled()).setRegistryName("Mesa Plateau M");
    
    public static HashMap<Integer, Biome> biomemap= new HashMap<>();
    
    static {
        biomemap.put(0, OCEAN);
        biomemap.put(1, PLAINS);
        biomemap.put(2, DESERT);
        biomemap.put(3, EXTREME_HILLS);
        biomemap.put(4, FOREST);
        biomemap.put(5, TAIGA);
        biomemap.put(6, SWAMPLAND);
        biomemap.put(7, RIVER);
        biomemap.put(8, HELL);
        biomemap.put(9, SKY);
        biomemap.put(10, FROZEN_OCEAN);
        biomemap.put(11, FROZEN_RIVER);
        biomemap.put(12, ICE_PLAINS);
        biomemap.put(13, ICE_MOUNTAINS);
        biomemap.put(14, MUSHROOM_ISLAND);
        biomemap.put(15, MUSHROOM_ISLAND_SHORE);
        biomemap.put(16, BEACH);
        biomemap.put(17, DESERT_HILLS);
        biomemap.put(18, FOREST_HILLS);
        biomemap.put(19, TAIGA_HILLS);
        biomemap.put(20, EXTREME_HILLS_EDGE);
        biomemap.put(21, JUNGLE);
        biomemap.put(22, JUNGLE_HILLS);
        biomemap.put(23, JUNGLE_EDGE);
        biomemap.put(24, DEEP_OCEAN);
        biomemap.put(25, STONE_BEACH);
        biomemap.put(26, COLD_BEACH);
        biomemap.put(27, BIRCH_FOREST);
        biomemap.put(28, BIRCH_FOREST_HILLS);
        biomemap.put(29, ROOFED_FOREST);
        biomemap.put(30, COLD_TAIGA);
        biomemap.put(31, COLD_TAIGA_HILLS);
        biomemap.put(32, REDWOOD_TAIGA);
        biomemap.put(33, REDWOOD_TAIGA_HILLS);
        biomemap.put(34, EXTREME_HILLS_WITH_TREES);
        biomemap.put(35, SAVANNA);
        biomemap.put(36, SAVANNA_PLATEAU);
        biomemap.put(37, MESA);
        biomemap.put(38, MESA_ROCK);
        biomemap.put(39, MESA_CLEAR_ROCK);
        biomemap.put(127, VOID); 
        biomemap.put(129, MUTATED_PLAINS);
        biomemap.put(130, MUTATED_DESERT);
        biomemap.put(131, MUTATED_EXTREME_HILLS);
        biomemap.put(132, MUTATED_FOREST);
        biomemap.put(133, MUTATED_TAIGA);
        biomemap.put(134, MUTATED_SWAMPLAND);
        biomemap.put(140, MUTATED_ICE_FLATS);
        biomemap.put(149, MUTATED_JUNGLE);
        biomemap.put(151, MUTATED_JUNGLE_EDGE);
        biomemap.put(155, MUTATED_BIRCH_FOREST);
        biomemap.put(156, MUTATED_BIRCH_FOREST_HILLS);
        biomemap.put(157, MUTATED_ROOFED_FOREST);
        biomemap.put(158, MUTATED_TAIGA_COLD);
        biomemap.put(160, MUTATED_REDWOOD_TAIGA);
        biomemap.put(161, MUTATED_REDWOOD_TAIGA_HILLS);
        biomemap.put(162, MUTATED_EXTREME_HILLS_WITH_TREES);
        biomemap.put(163, MUTATED_SAVANNA);
        biomemap.put(164, MUTATED_SAVANNA_ROCK);
        biomemap.put(165, MUTATED_MESA_ROCK);
        biomemap.put(166, MUTATED_MESA_CLEAR_ROCK);        
    }
}

This is the BiomeNew class (This could be the cause of the problem)

 

package com.amurdza.mymod.biomes;

import  com.amurdza.mymod.entity.mobs.*;

import java.util.Random;

import javax.annotation.Nullable;

import net.minecraft.entity.EntityLiving;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenMelon;
import net.minecraft.world.gen.feature.WorldGenVines;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.block.BlockFlower;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.entity.passive.EntityDonkey;
import net.minecraft.entity.passive.EntitySquid;

public class BiomeNew extends Biome{
    
    private final int plantsscore;
    private final int flowerscore;
    private final int cropsscore;
    private final int animalsscore;
    private final int mineralsscore;
    private final int mushroomscore;
    private final int monstersscore;
    private final int husbandryscore;
    private final int treesscore;
    public BiomeDecoratorNew theBiomeDecorator;
    
    
    public BiomeNew(BiomeProperties properties) {
        super(properties);
        plantsscore=BiomeScores.getPlantsScore(this);
        flowerscore=BiomeScores.getFlowerScore(this);
        cropsscore=BiomeScores.getCropScore(this);
        animalsscore=BiomeScores.getAnimalScore(this);
        mineralsscore=BiomeScores.getMineralScore(this);
        mushroomscore=BiomeScores.getMushroomScore(this);
        husbandryscore=BiomeScores.getHusbandryScore(this);
        treesscore=BiomeScores.getTreeScore(this);
        monstersscore=BiomeScores.getMonsterScore(this);
        
        this.theBiomeDecorator = this.createBiomeDecoratorNew();
        
        if(flowerscore<2) {
            this.theBiomeDecorator.flowersPerChunk=0;
        }
        
        else if(flowerscore<4) {
            this.theBiomeDecorator.flowersPerChunk=6;
        }
        
        else if(flowerscore<6) {
            this.theBiomeDecorator.flowersPerChunk=8;
        }
        
        else if(flowerscore<8) {
            this.theBiomeDecorator.flowersPerChunk=14;
        }
        else if(flowerscore<10) {
            this.theBiomeDecorator.flowersPerChunk=30;
        }
        else {
            this.theBiomeDecorator.flowersPerChunk=100;
        }
       
        if(monstersscore>0) {
            this.theBiomeDecorator.dungeonchance=4*monstersscore;
            this.theBiomeDecorator.useDungeons=true;
        }
        else {
            this.theBiomeDecorator.useDungeons=false;
        }
        
        if(this.cropsscore<2) {
            this.theBiomeDecorator.pumpkinchance=25;
        }
        
        else if(this.cropsscore<4) {
            this.theBiomeDecorator.pumpkinchance=25;
        }
        
        else if(this.cropsscore<6) {
            this.theBiomeDecorator.pumpkinchance=15;
        }
        else if(this.cropsscore<8) {
            this.theBiomeDecorator.pumpkinchance=10;
        }
        else {
            this.theBiomeDecorator.pumpkinchance=10;
        }
        if(this.plantsscore<2) {
            this.theBiomeDecorator.reedsPerChunk=0;
        }
        
        else if(this.plantsscore<4) {
            this.theBiomeDecorator.reedsPerChunk=3;
        }
        
        else if(this.plantsscore<6) {
            this.theBiomeDecorator.reedsPerChunk=8;
        }
        
        else if(this.plantsscore<8) {
            this.theBiomeDecorator.reedsPerChunk=15;
        }
        
        else if(this.plantsscore<10) {
            this.theBiomeDecorator.reedsPerChunk=30;
        }
        
        if(this.animalsscore<4) {
            
        }
        
        else if(this.plantsscore<6) {
            this.theBiomeDecorator.grassPerChunk=10;
        }
        
        else if(this.plantsscore<8) {
            this.theBiomeDecorator.grassPerChunk=25;
        }
        
        else if(this.plantsscore<10) {
            this.theBiomeDecorator.grassPerChunk=80;
        }

        
        this.theBiomeDecorator.useMineshafts=false;
        
        if(this.mineralsscore<2) {
            this.theBiomeDecorator.coalmaxheight=0;
            this.theBiomeDecorator.ironmaxheight=0;
            this.theBiomeDecorator.redstonemaxheight=0;
            this.theBiomeDecorator.emeraldmaxheight=0;
            this.theBiomeDecorator.goldmaxheight=0;
            this.theBiomeDecorator.lapismaxheight=0;
            this.theBiomeDecorator.diamondmaxheight=0;
            this.theBiomeDecorator.useRavines=false;
            this.theBiomeDecorator.useLavaLakes=false;
        }
        
        else if(this.mineralsscore<4) {
            this.theBiomeDecorator.coalmaxheight=128;
            this.theBiomeDecorator.ironmaxheight=64;
            this.theBiomeDecorator.redstonemaxheight=16;
            this.theBiomeDecorator.emeraldmaxheight=16;
            this.theBiomeDecorator.goldmaxheight=32;
            this.theBiomeDecorator.lapismaxheight=16;
            this.theBiomeDecorator.diamondmaxheight=16;
            this.theBiomeDecorator.coalsize=17;
            this.theBiomeDecorator.ironsize=9;
            this.theBiomeDecorator.goldsize=9;
            this.theBiomeDecorator.diamondsize=8;
            this.theBiomeDecorator.redstonesize=8;
            this.theBiomeDecorator.lapissize=7;
            this.theBiomeDecorator.emeraldsize=8;
            this.theBiomeDecorator.coaltries=20;
            this.theBiomeDecorator.irontries=20;
            this.theBiomeDecorator.redstonetries=8;
            this.theBiomeDecorator.goldtries=2;
            this.theBiomeDecorator.diamondtries=1;
            this.theBiomeDecorator.lapistries=1;
            this.theBiomeDecorator.emeraldtries=1;
            this.theBiomeDecorator.obsidiantries=8;
            this.theBiomeDecorator.obsidiansize=5;
            this.theBiomeDecorator.obsidianmaxheight=32;
        }
        
        else if(this.mineralsscore<6) {
            this.theBiomeDecorator.coalmaxheight=128;
            this.theBiomeDecorator.ironmaxheight=80;
            this.theBiomeDecorator.redstonemaxheight=32;
            this.theBiomeDecorator.emeraldmaxheight=32;
            this.theBiomeDecorator.goldmaxheight=64;
            this.theBiomeDecorator.lapismaxheight=32;
            this.theBiomeDecorator.diamondmaxheight=32;
            this.theBiomeDecorator.coalsize=20;
            this.theBiomeDecorator.ironsize=11;
            this.theBiomeDecorator.goldsize=10;
            this.theBiomeDecorator.diamondsize=10;
            this.theBiomeDecorator.redstonesize=10;
            this.theBiomeDecorator.lapissize=10;
            this.theBiomeDecorator.emeraldsize=10;
            this.theBiomeDecorator.coaltries=24;
            this.theBiomeDecorator.irontries=24;
            this.theBiomeDecorator.redstonetries=10;
            this.theBiomeDecorator.goldtries=4;
            this.theBiomeDecorator.diamondtries=2;
            this.theBiomeDecorator.lapistries=2;
            this.theBiomeDecorator.emeraldtries=2;
            this.theBiomeDecorator.obsidiantries=10;
            this.theBiomeDecorator.obsidiansize=8;
            this.theBiomeDecorator.obsidianmaxheight=64;
            this.theBiomeDecorator.lavalakechance=80;
        }
        
        else if(this.mineralsscore<8) {
            this.theBiomeDecorator.useMineshafts=true;
            this.theBiomeDecorator.coalmaxheight=128;
            this.theBiomeDecorator.ironmaxheight=128;
            this.theBiomeDecorator.redstonemaxheight=50;
            this.theBiomeDecorator.emeraldmaxheight=50;
            this.theBiomeDecorator.goldmaxheight=80;
            this.theBiomeDecorator.lapismaxheight=50;
            this.theBiomeDecorator.diamondmaxheight=50;
            this.theBiomeDecorator.coalsize=25;
            this.theBiomeDecorator.ironsize=16;
            this.theBiomeDecorator.goldsize=14;
            this.theBiomeDecorator.diamondsize=14;
            this.theBiomeDecorator.redstonesize=14;
            this.theBiomeDecorator.lapissize=14;
            this.theBiomeDecorator.emeraldsize=14;
            this.theBiomeDecorator.coaltries=27;
            this.theBiomeDecorator.irontries=27;
            this.theBiomeDecorator.redstonetries=15;
            this.theBiomeDecorator.goldtries=10;
            this.theBiomeDecorator.diamondtries=5;
            this.theBiomeDecorator.lapistries=5;
            this.theBiomeDecorator.emeraldtries=5;
            this.theBiomeDecorator.obsidiantries=12;
            this.theBiomeDecorator.obsidiansize=15;
            this.theBiomeDecorator.obsidianmaxheight=80;
            this.theBiomeDecorator.lavalakechance=40;
        }
        
        else if(this.mineralsscore<10) {
            this.theBiomeDecorator.useMineshafts=true;
            this.theBiomeDecorator.coalmaxheight=128;
            this.theBiomeDecorator.ironmaxheight=128;
            this.theBiomeDecorator.redstonemaxheight=70;
            this.theBiomeDecorator.emeraldmaxheight=70;
            this.theBiomeDecorator.goldmaxheight=128;
            this.theBiomeDecorator.lapismaxheight=70;
            this.theBiomeDecorator.diamondmaxheight=70;
            this.theBiomeDecorator.coalsize=32;
            this.theBiomeDecorator.ironsize=24;
            this.theBiomeDecorator.goldsize=18;
            this.theBiomeDecorator.diamondsize=18;
            this.theBiomeDecorator.redstonesize=18;
            this.theBiomeDecorator.lapissize=18;
            this.theBiomeDecorator.emeraldsize=18;
            this.theBiomeDecorator.coaltries=35;
            this.theBiomeDecorator.irontries=35;
            this.theBiomeDecorator.redstonetries=20;
            this.theBiomeDecorator.goldtries=20;
            this.theBiomeDecorator.diamondtries=10;
            this.theBiomeDecorator.lapistries=10;
            this.theBiomeDecorator.emeraldtries=10;
            this.theBiomeDecorator.obsidiantries=20;
            this.theBiomeDecorator.obsidiansize=18;
            this.theBiomeDecorator.obsidianmaxheight=128;
            this.theBiomeDecorator.lavalakechance=20;
        }
        
        if(this.mushroomscore<2) {
            this.theBiomeDecorator.mushroomsPerChunk=0;
        }
        
        else if(this.mushroomscore<4) {
            this.theBiomeDecorator.mushroomsPerChunk=2;
        }
        
        else if(this.mushroomscore<6) {
            this.theBiomeDecorator.mushroomsPerChunk=6;
        }
        
        else if(this.mushroomscore<8) {
            this.theBiomeDecorator.mushroomsPerChunk=10;
        }
        
        else if(this.mushroomscore<10) {
            this.theBiomeDecorator.mushroomsPerChunk=16;
        }
        this.spawnableCreatureList.clear();
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntitySheepNew.class, 10, 4, 4));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPigNew.class, 10, 4, 4));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChickenNew.class, 10, 4, 4));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCowNew.class, 10, 4, 4));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChickenNew.class, 10, 4, 4));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityRabbitNew.class, 10, 2, 3));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityHorseNew.class, 5, 2, 3));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityDonkey.class, 3, 2, 3));
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityLlamaNew.class, 3, 2, 3));
        
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySpider.class, 100, 4, 4));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombie.class, 95, 4, 4));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombieVillager.class, 5, 1, 1));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
       // this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 100, 4, 4));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
        this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1));
        
        this.spawnableWaterCreatureList.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4));
        this.spawnableCaveCreatureList.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8));
    }
    
    public BiomeDecoratorNew createBiomeDecoratorNew()
    {
        return new BiomeDecoratorNew();
    }
    
    public BlockFlower.EnumFlowerType pickRandomFlower(Random rand, BlockPos pos)
    {
        if(this.flowerscore<2) {
            return rand.nextInt(2) > 0 ? BlockFlower.EnumFlowerType.DANDELION : BlockFlower.EnumFlowerType.POPPY;
        }
        
        if(this.flowerscore<4) {
            int randnum=rand.nextInt(8);
            if(randnum==0) {
                return BlockFlower.EnumFlowerType.DANDELION;
            }
            else if(randnum==1) {
                return BlockFlower.EnumFlowerType.POPPY;
            }
            else if(randnum==2) {
                return BlockFlower.EnumFlowerType.HOUSTONIA;
            }
            else if(randnum==3) {
                return BlockFlower.EnumFlowerType.OXEYE_DAISY;
            }
            else if(randnum==4) {
                return BlockFlower.EnumFlowerType.WHITE_TULIP;
            }
            else if(randnum==5) {
                return BlockFlower.EnumFlowerType.PINK_TULIP;
            }
            else if(randnum==6) {
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;
            }
            else {
                return BlockFlower.EnumFlowerType.RED_TULIP;
            }
                       
        }
        
        else {
            int randnum=rand.nextInt(12);
            
            if(randnum==0) {
                return BlockFlower.EnumFlowerType.DANDELION;
            }
            
            else if(randnum==1) {
                return BlockFlower.EnumFlowerType.POPPY;
            }
            
            else if(randnum==2) {
                return BlockFlower.EnumFlowerType.HOUSTONIA;
            }
            
            else if(randnum==3) {
                return BlockFlower.EnumFlowerType.OXEYE_DAISY;
            }
            
            else if(randnum==4) {
                return BlockFlower.EnumFlowerType.WHITE_TULIP;
            }
            
            else if(randnum==5) {
                return BlockFlower.EnumFlowerType.PINK_TULIP;
            }
            
            else if(randnum==6) {
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;
            }
            
            else if(randnum==7) {
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;
            }
            
            else if(randnum==8) {
                return BlockFlower.EnumFlowerType.ORANGE_TULIP;
            }
            
            else if(randnum==9){
                return BlockFlower.EnumFlowerType.RED_TULIP;
            }
            
            else if(randnum==10){
                return BlockFlower.EnumFlowerType.ALLIUM;
            }
        
            else {
                return BlockFlower.EnumFlowerType.BLUE_ORCHID;
            }
            
        }

    }
        
    
    public float getSpawningChance()
    {
       if(this.animalsscore<2) {
           return 0.07F;
       }
       else if(this.animalsscore<4) {
           return 0.10F;
       }
       else if(this.animalsscore<6) {
           return 0.15F;
       }
       else if(animalsscore<8) {
           return 0.20F;
       }
       else {
           return 0.30F;
       }
    }
    
    public void decorate(World worldIn, Random rand, BlockPos pos)
    {
        this.theBiomeDecorator.decorate(worldIn, rand, this, pos);
        if(this.flowerscore>4) {
            int i = rand.nextInt(5) - 3;
            if(this.flowerscore>6) {
                i=i+2;
            }
            if(this.flowerscore>6) {
                i=i+3;
            }
            this.addDoublePlants(worldIn, rand, pos, i);
        }
        if(this.cropsscore>4) {
            int i = rand.nextInt(16) + 8;
            int j = rand.nextInt(16) + 8;
            int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
            (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
        }

        if(this.plantsscore>4) {
            DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.FERN);

            WorldGenVines worldgenvines = new WorldGenVines();

            for (int j1 = 0; j1 < 50; ++j1)
            {
                int k1 = rand.nextInt(16) + 8;
                int l = 128;
                int i1 = rand.nextInt(16) + 8;
                worldgenvines.generate(worldIn, rand, pos.add(k1, 128, i1));
            }
            
            for (int i1 = 0; i1 < 7; ++i1)
            {
                int j1 = rand.nextInt(16) + 8;
                int k1 = rand.nextInt(16) + 8;
                int l1 = rand.nextInt(worldIn.getHeight(pos.add(j1, 0, k1)).getY() + 32);
                DOUBLE_PLANT_GENERATOR.generate(worldIn, rand, pos.add(j1, l1, k1));
            }
        }
        if(this.plantsscore>6) {
            
            for (int i1 = 0; i1 < 7; ++i1)
            {
                int j1 = rand.nextInt(16) + 8;
                int k1 = rand.nextInt(16) + 8;
                int l1 = rand.nextInt(worldIn.getHeight(pos.add(j1, 0, k1)).getY() + 32);
                DOUBLE_PLANT_GENERATOR.generate(worldIn, rand, pos.add(j1, l1, k1));
            }
            
        }
    }
    
    protected void addDoublePlants(World p_185378_1_, Random p_185378_2_, BlockPos p_185378_3_, int p_185378_4_)
    {
        for (int i = 0; i < p_185378_4_; ++i)
        {
            int j = p_185378_2_.nextInt(3);

            if (j == 0)
            {
                DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.SYRINGA);
            }
            else if (j == 1)
            {
                DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.ROSE);
            }
            else if (j == 2)
            {
                DOUBLE_PLANT_GENERATOR.setPlantType(BlockDoublePlant.EnumPlantType.PAEONIA);
            }

            for (int k = 0; k < 5; ++k)
            {
                int l = p_185378_2_.nextInt(16) + 8;
                int i1 = p_185378_2_.nextInt(16) + 8;
                int j1 = p_185378_2_.nextInt(p_185378_1_.getHeight(p_185378_3_.add(l, 0, i1)).getY() + 32);

                if (DOUBLE_PLANT_GENERATOR.generate(p_185378_1_, p_185378_2_, new BlockPos(p_185378_3_.getX() + l, j1, p_185378_3_.getZ() + i1)))
                {
                    break;
                }
            }
        }
    }
    public WorldGenAbstractTree genBigTreeChance(Random rand)
    {
        return (WorldGenAbstractTree)(rand.nextInt(10) == 0 ? BIG_TREE_FEATURE : TREE_FEATURE);
    }
}


 

This is the BiomeProviderNew class (This might be the cause of the problem, but I don't think so)

 

package com.amurdza.mymod.biomes;

import java.lang.reflect.Field;

import com.google.common.collect.Lists;

import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.init.Biomes;
import net.minecraft.util.ReportedException;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeCache;
import net.minecraft.world.biome.BiomeProvider;
import net.minecraft.world.gen.ChunkGeneratorSettings;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.storage.WorldInfo;

public class BiomeProviderNew extends BiomeProvider{
    
    
    protected Field settingssetter;
    protected Field genBiomessetter;
    protected Field biomeIndexLayersetter;
    protected Field parentgetter;
    protected Field cachegetter;
    
    protected BiomeProviderNew() throws NoSuchFieldException, SecurityException
    {
        super();
        settingssetter=BiomeProvider.class.getDeclaredField("settings");
        genBiomessetter=BiomeProvider.class.getDeclaredField("genBiomes");
        biomeIndexLayersetter=BiomeProvider.class.getDeclaredField("biomeIndexLayer");
        parentgetter=BiomeProvider.class.getDeclaredField("biomeIndexLayer");
        cachegetter=BiomeProvider.class.getDeclaredField("biomeCache");
        settingssetter.setAccessible(true);
        genBiomessetter.setAccessible(true);
        biomeIndexLayersetter.setAccessible(true);
        parentgetter.setAccessible(true);
        cachegetter.setAccessible(true);
    }

    
    public Biome getBiome(BlockPos pos, Biome defaultBiome)
    {
        try {
            return ((BiomeCache)cachegetter.get(this)).getBiome(pos.getX(), pos.getZ(), defaultBiome);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println("biome not found!");
            return BiomesNew.OCEAN;
        }
    }
    
    public BiomeProviderNew(WorldInfo info) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException
    {
        this(info.getSeed(), info.getTerrainType(), info.getGeneratorOptions());
    }
    
    private BiomeProviderNew(long seed, WorldType worldTypeIn, String options) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException
    {
        this();
        
        if (worldTypeIn == WorldType.CUSTOMIZED && !options.isEmpty())
        {
            settingssetter.set(this,ChunkGeneratorSettings.Factory.jsonToFactory(options).build());
        }

        GenLayer[] agenlayer = this.initializeGenerators(seed, worldTypeIn, (ChunkGeneratorSettings) settingssetter.get(this));
        agenlayer = getModdedBiomeGenerators(worldTypeIn, seed, agenlayer);
        genBiomessetter.set(this,agenlayer[0]);
        biomeIndexLayersetter.set(this,agenlayer[1]);
    }
    
    public Biome[] getBiomesForGeneration(Biome[] biomes, int x, int z, int width, int height)
    {
        IntCache.resetIntCache();

        if (biomes == null || biomes.length < width * height)
        {
            biomes = new Biome[width * height];
        }

        int[] aint = null;
        try {
            aint = ((GenLayer)genBiomessetter.get(this)).getInts(x, z, width, height);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        try
        {
            for (int i = 0; i < width * height; ++i)
            {
                biomes = Biome.getBiome(aint, Biomes.DEFAULT);
            }
            return biomes;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock");
            crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(biomes.length));
            crashreportcategory.addCrashSection("x", Integer.valueOf(x));
            crashreportcategory.addCrashSection("z", Integer.valueOf(z));
            crashreportcategory.addCrashSection("w", Integer.valueOf(width));
            crashreportcategory.addCrashSection("h", Integer.valueOf(height));
            throw new ReportedException(crashreport);
        }
    }

    public GenLayer[] initializeGenerators(long seed, WorldType p_180781_2_, ChunkGeneratorSettings p_180781_3_) {
        
        GenLayer genlayer = new GenLayerIsland(1L);
        genlayer = new GenLayerFuzzyZoom(2000L, genlayer);
        GenLayer genlayeraddisland = new GenLayerAddIsland(1L, genlayer);
        GenLayer genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland);
        GenLayer genlayeraddisland1 = new GenLayerAddIsland(2L, genlayerzoom);
        genlayeraddisland1 = new GenLayerAddIsland(50L, genlayeraddisland1);
        genlayeraddisland1 = new GenLayerAddIsland(70L, genlayeraddisland1);
        GenLayer genlayerremovetoomuchocean = new GenLayerRemoveTooMuchOcean(2L, genlayeraddisland1);
        GenLayer genlayeraddsnow = new GenLayerAddSnow(2L, genlayerremovetoomuchocean);
        GenLayer genlayeraddisland2 = new GenLayerAddIsland(3L, genlayeraddsnow);
        GenLayer genlayeredge = new GenLayerEdge(2L, genlayeraddisland2, GenLayerEdge.Mode.COOL_WARM);
        genlayeredge = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE);
        genlayeredge = new GenLayerEdge(3L, genlayeredge, GenLayerEdge.Mode.SPECIAL);
        GenLayer genlayerzoom1 = new GenLayerZoom(2002L, genlayeredge);
        genlayerzoom1 = new GenLayerZoom(2003L, genlayerzoom1);
        GenLayer genlayeraddisland3 = new GenLayerAddIsland(4L, genlayerzoom1);
        GenLayer genlayeraddmushroomisland = new GenLayerAddMushroomIsland(5L, genlayeraddisland3);
        GenLayer genlayerdeepocean = new GenLayerDeepOcean(4L, genlayeraddmushroomisland);
        GenLayer genlayer4 = GenLayerZoom.magnify(1000L, genlayerdeepocean, 0);
        int i = 4;
        int j = i;

        if (p_180781_3_ != null)
        {
            i = p_180781_3_.biomeSize;
            j = p_180781_3_.riverSize;
        }

        if (p_180781_2_ == WorldType.LARGE_BIOMES)
        {
            i = 6;
        }

        i = getModdedBiomeSize(p_180781_2_, i);

        GenLayer lvt_7_1_ = GenLayerZoom.magnify(1000L, genlayer4, 0);
        GenLayer genlayerriverinit = new GenLayerRiverInit(100L, lvt_7_1_);
        GenLayer genlayerbiomeedge = this.getBiomeLayer(seed, genlayer4, p_180781_3_, p_180781_2_);
        GenLayer lvt_9_1_ = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
        GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_9_1_);
        GenLayer genlayer5 = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
        genlayer5 = GenLayerZoom.magnify(1000L, genlayer5, j);
        GenLayer genlayerriver = new GenLayerRiver(1L, genlayer5);
        GenLayer genlayersmooth = new GenLayerSmooth(1000L, genlayerriver);
        genlayerhills = new GenLayerRareBiome(1001L, genlayerhills);

        for (int k = 0; k < i; ++k)
        {
            genlayerhills = new GenLayerZoom((long)(1000 + k), genlayerhills);
            
            if (k == 0)
            {
                genlayerhills = new GenLayerAddIsland(3L, genlayerhills);
            }

            if (k == 1 || i == 1)
            {
                genlayerhills = new GenLayerShore(1000L, genlayerhills);
            }
        }

        GenLayer genlayersmooth1 = new GenLayerSmooth(1000L, genlayerhills);
        GenLayer genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth);
        GenLayer genlayer3 = new GenLayerVoronoiZoom(10L, genlayerrivermix);
        genlayerrivermix.initWorldGenSeed(seed);
        genlayer3.initWorldGenSeed(seed);
        return new GenLayer[] {genlayerrivermix, genlayer3, genlayerrivermix};
        
        
    }
    
    public GenLayer getBiomeLayer(long seed, GenLayer parentLayer, ChunkGeneratorSettings chunkSettings, WorldType worldType) {
        net.minecraft.world.gen.layer.GenLayer ret= new GenLayerBiomeNew(200L, parentLayer, worldType, chunkSettings);
        ret = net.minecraft.world.gen.layer.GenLayerZoom.magnify(1000L, ret, 2);
        ret = new net.minecraft.world.gen.layer.GenLayerBiomeEdge(1000L, ret);
        return ret;
    }
    
    public static int getModdedBiomeSize(WorldType worldType, int original)
    {
        net.minecraftforge.event.terraingen.WorldTypeEvent.BiomeSize event = new net.minecraftforge.event.terraingen.WorldTypeEvent.BiomeSize(worldType, original);
        net.minecraftforge.common.MinecraftForge.TERRAIN_GEN_BUS.post(event);
        return event.getNewSize();
    }
    
}

 

This is GenLayerBiomeNew (I don't think that this is the cause of the problem)

 

package com.amurdza.mymod.biomes;

import net.minecraft.init.Biomes;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.ChunkGeneratorSettings;
import net.minecraft.world.gen.layer.GenLayer;
import net.minecraft.world.gen.layer.GenLayerBiome;
import net.minecraft.world.gen.layer.IntCache;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.common.BiomeManager.BiomeType;

public class GenLayerBiomeNew extends GenLayerBiome {

    @SuppressWarnings("unchecked")
    private java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry>[] biomes1 = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length];
    private final ChunkGeneratorSettings settings1;
    
    public GenLayerBiomeNew(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkGeneratorSettings p_i45560_5_)
    {
        super(p_i45560_1_, p_i45560_3_, p_i45560_4_, p_i45560_5_);
        this.parent = p_i45560_3_;

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

            if (biomes1[idx] == null) biomes1[idx] = new java.util.ArrayList<net.minecraftforge.common.BiomeManager.BiomeEntry>();
            if (biomesToAdd != null) biomes1[idx].addAll(biomesToAdd);
        }

        int desertIdx = net.minecraftforge.common.BiomeManager.BiomeType.DESERT.ordinal();

        biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.DESERT, 30));
        biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.SAVANNA, 20));
        biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.PLAINS, 10));

        if (p_i45560_4_ == WorldType.DEFAULT_1_1)
        {
            biomes1[desertIdx].clear();
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.DESERT, 10));
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.FOREST, 10));
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.EXTREME_HILLS, 10));
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.SWAMPLAND, 10));
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.PLAINS, 10));
            biomes1[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.TAIGA, 10));
            this.settings1 = null;
        }
        else
        {
            this.settings1 = p_i45560_5_;
        }
        int desertnum=BiomeManager.BiomeType.DESERT.ordinal();
        int coolnum=BiomeManager.BiomeType.COOL.ordinal();
        int warmnum=BiomeManager.BiomeType.WARM.ordinal();
        int icynum=BiomeManager.BiomeType.ICY.ordinal();
        biomes1[desertnum].clear();
        biomes1[warmnum].clear();
        biomes1[icynum].clear();
        biomes1[coolnum].clear();
        biomes1[desertnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.DESERT, 40));
        biomes1[desertnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.SAVANNA, 120));
        biomes1[desertnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.PLAINS, 20));
        biomes1[desertnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.SWAMPLAND, 70));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.COLD_TAIGA, 30));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.ICE_PLAINS, 30));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.TAIGA, 40));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.EXTREME_HILLS, 60));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.PLAINS, 80));
        biomes1[icynum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.BIRCH_FOREST, 10));
        biomes1[warmnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.JUNGLE, 250));
        biomes1[coolnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.FOREST, 100));  
        biomes1[coolnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.SWAMPLAND, 30));
        biomes1[coolnum].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomesNew.ROOFED_FOREST, 120));
    }

    /**
     * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall
     * amounts, or Biome ID's based on the particular GenLayer subclass.
     */
    public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)
    {
        int[] aint = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);
        int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);

        for (int i = 0; i < areaHeight; ++i)
        {
            for (int j = 0; j < areaWidth; ++j)
            {
                this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
                int k = aint[j + i * areaWidth];
                int l = (k & 3840) >> 8;
                k = k & -3841;

                if (this.settings1 != null && this.settings1.fixedBiome >= 0)
                {
                    aint1[j + i * areaWidth] = this.settings1.fixedBiome;
                }
                else if (isBiomeOceanic(k))
                {
                    aint1[j + i * areaWidth] = k;
                }
                else if (k == Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND))
                {
                    aint1[j + i * areaWidth] = k;
                }
                else if (k == 1)
                {
                    if (l > 0)
                    {
                        if (this.nextInt(3) == 0)
                        {
                            aint1[j + i * areaWidth] = Biome.getIdForBiome(BiomesNew.MESA_CLEAR_ROCK);
                        }
                        else
                        {
                            aint1[j + i * areaWidth] = Biome.getIdForBiome(BiomesNew.MESA_ROCK);
                        }
                    }
                    else
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.DESERT).biome);
                    }
                }
                else if (k == 2)
                {
                    if (l > 0)
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(BiomesNew.JUNGLE);
                    }
                    else
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.WARM).biome);
                    }
                }
                else if (k == 3)
                {
                    if (l > 0)
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(BiomesNew.MUSHROOM_ISLAND);
                    }
                    else
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.COOL).biome);
                    }
                }
                else if (k == 4)
                {
                    if (l > 0)
                    {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(BiomesNew.REDWOOD_TAIGA);
                    }
                    else {
                        aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.ICY).biome);    
                    }
                }
                else
                {
                    aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND);
                }
            }
        }

        return aint1;
    }

    protected net.minecraftforge.common.BiomeManager.BiomeEntry getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType type)
    {
        java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry> biomeList = biomes1[type.ordinal()];
        int totalWeight = net.minecraft.util.WeightedRandom.getTotalWeight(biomeList);
        int weight = net.minecraftforge.common.BiomeManager.isTypeListModded(type)?nextInt(totalWeight):nextInt(totalWeight / 10) * 10;
        return (net.minecraftforge.common.BiomeManager.BiomeEntry)net.minecraft.util.WeightedRandom.getRandomItem(biomeList, weight);
    }
    
}
 

Biome Registry Handler (I don't think this is the source of the problem, I did not recently change it)

 

package com.amurdza.mymod.biomes;

import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.registries.IForgeRegistry;

@EventBusSubscriber
public class BiomeRegistryHandler {
    
    @SubscribeEvent
    public static void onBiomeRegister(RegistryEvent.Register<Biome> event) {
        Object[] biomelist = BiomesNew.biomemap.values().toArray();
        for(int k=0;k<BiomesNew.biomemap.size();k++) {
            event.getRegistry().register((Biome)biomelist[k]);
        }
    }
    
}

 

Biome registerer (I don't think this is the problem I did not recently change it)

 

package com.amurdza.mymod.biomes;

import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.BiomeManager;
import net.minecraftforge.fml.common.registry.ForgeRegistries;

public class BiomeRegisterer {

    public static void registerBiomes() {
        Object[] biomelist = BiomesNew.biomemap.values().toArray();
        for(int k=0;k<BiomesNew.biomemap.size();k++) {
            BiomeManager.addSpawnBiome((Biome)biomelist[k]);
        }
    }
    
}


 

Custom Biome Provider (I strongly believe the issue is not related to this class because I don't remember recently changing it)

 

package com.amurdza.mymod.biomes;

import java.lang.reflect.Field;

import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.profiler.Profiler;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldServer;
import net.minecraft.world.WorldServerMulti;
import net.minecraft.world.biome.BiomeProvider;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldInfo;
import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;

public class CustomBiomeProvider {

    @SubscribeEvent
    public void OnDimensionLoad(WorldEvent event) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException {
        World oldworld = event.getWorld();
        WorldProvider oldworldprovider=event.getWorld().provider;
        Field biomeprovidersetter=WorldProvider.class.getDeclaredField("biomeProvider");
        biomeprovidersetter.setAccessible(true);
        BiomeProviderNew newbiomeprovider = new BiomeProviderNew(event.getWorld().getWorldInfo());
        biomeprovidersetter.set(oldworldprovider,(BiomeProvider)newbiomeprovider);
    }
    
}

 

 

 


 

Edited by Andrew Murdza
Link to comment
Share on other sites

@Andrew Murdza Please reformat your post do that you either use spoilers or the code block the button for which looks like <>

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Sigh. There's an edit button at the bottom.

edit.png

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I don't know the problem, but in the future, to avoid issues like this, please use version control. For example, use Git and use GitHub to store your code online and view past code in a more organized way.

Link to comment
Share on other sites

On 9/28/2018 at 11:36 AM, Andrew Murdza said:

At the same time, I get the message MyMod loaded a new chunk [23, 17] in dimension 0 (overworld) while populating chunk [23, 16], causing cascading worldgen lag

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Double post

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.