private void genTerrainFromNoise(ChunkTerrainControl ctc) {
        Perlin noise = new Perlin();
        noise.setFrequency(0.01);
        noise.setLacunarity(2.0);
        noise.setNoiseQuality(NoiseQuality.BEST);
        noise.setOctaveCount(8);
        noise.setPersistence(0.5);
        noise.setSeed(DEFAULT_SEED);
        Vector3i point = new Vector3i();
        for (int x = -160; x < 160; x++) {
            point.setX(x);
            for (int z = -160; z < 160; z++) {
                int landHeight = (int) (Math.floor(noise.getValue(x, 0, z) * 20 + 20));
                int dirtHeight = (int) (Math.floor((hash(x, z) >> 8 & 0xf) / 15f * 3) + 1);
                point.setZ(z);
                for (int y = 0; y < 64; y++) {
                    point.setY(y);
                    if (y == 0) {
                        ctc.setBlock(Block_Stone.class, point, true);
                    } else if (y > landHeight)
                            continue;
                    if (y == landHeight) {
                        ctc.setBlock(Block_Grass.class, point, true);
                    } else if (y >= landHeight - dirtHeight) {
                        ctc.setBlock(Block_Dirt.class, point, true);
                    } else {
                        ctc.setBlock(Block_Stone.class, point, true);
                    }
                }
            }
        }
    }