public FictionWorldChunkGenerator(long seed, FictionWorldAttributes attributes) {
        //Create distance altitude multiplication matrix
        double g = 0;
        double distanceGridAddition = attributes.getDistanceGridAddition();
        for(int x = -8; x < 9; x++) {
            for(int z = -8; z < 9; z++) {
                g += 1.0 / Math.sqrt(x * x + z * z + distanceGridAddition);
            }
        }
        int i = 0;
        for(int x = -8; x < 9; x++) {
            for(int z = -8; z < 9; z++) {
                this.distanceFactorGrid[i] = (1.0 / Math.sqrt( x * x + z * z + distanceGridAddition)) / g;
                i++;
            }
        }
        
        this.seed = seed;
        
        this.noise = new SimplexOctaveGenerator(this.seed, 8);
        this.noise.setScale(1.0D / 64.0D);
        this.noiseAmplitude = attributes.getNoiseAmplitude();
        this.noiseFrequency = attributes.getNoiseFrequency();
        
        this.layer = BiomeLayer.getLayer(attributes.getAverageRainfall(), attributes.getAverageTemperature(), attributes.getHostility(), this.seed);
        
        this.apocalypse = attributes.getHostility() == FictionWorldHostility.APOCALYPSE;
        
        if(this.apocalypse) {
            double rainfall = attributes.getAverageRainfall();
            double temperature = attributes.getAverageTemperature();
            if(rainfall > .8) {
                this.waterLevel = 102;
                if(temperature < .2) {
                    apoValue = 3;
                } else {
                    apoValue = 0;
                }
            } else if(temperature > .8) {
                this.waterLevel = 36;
                this.populators.add(new FirePopulator());
                apoValue = 6;
            } else {
                this.waterLevel = 36;
                this.populators.add(new FirePopulator());
                apoValue = 9;
            }
            
        } else {
            this.waterLevel = attributes.getWaterLevel();
            this.populators.add(new TreePopulator());
            this.populators.add(new GrassPopulator());
            this.populators.add(new SnowPopulator());}
    }