#All changes from vanilla are within lines made up of # characters.

genLayer = new GenLayerIsland(1)

genLayer = new GenLayerFuzzyZoom(2000, genLayer)

genLayer = new GenLayerAddIsland(1, genLayer)

genLayer = new GenLayerZoom(2001, genLayer)

genLayer = new GenLayerAddIsland(2, genLayer)

genLayer = new GenLayerAddIsland(50, genLayer)

genLayer = new GenLayerAddIsland(70, genLayer)

genLayer = new GenLayerRemoveTooMuchOcean(2, genLayer)

genLayer = new GenLayerAddSnow(2, genLayer)

genLayer = new GenLayerAddIsland(3, genLayer)

genLayer = new GenLayerEdge(2, genLayer, Edge_Mode_Cool_Warm)

genLayer = new GenLayerEdge(2, genLayer, Edge_Mode_Heat_Ice)

genLayer = new GenLayerEdge(3, genLayer, Edge_Mode_Special)

genLayer = new GenLayerZoom(2002, genLayer)

genLayer = new GenLayerZoom(2003, genLayer)

genLayer = new GenLayerAddIsland(4, genLayer)

genLayer = new GenLayerAddMushroomIsland(5, genLayer)

genLayer = new GenLayerDeepOcean(4, genLayer)

genLayer2 = magnify(1000, genLayer, 0)

genLayer3 = magnify(1000, genLayer2, 0)

genLayer3 = new GenLayerRiverInit(100, genLayer3)

genLayer4 = magnify(1000, genLayer3, 2)


##########################################################################

#Remove vanilla biome layer
#genLayer2 = new GenLayerBiome(200, genLayer2, worldType, null)

#Add custom biome layer
genLayer2 = new GenLayerBiomeDC(200, genLayer2)

genLayer2.addBiome("Desert", 2, 30)
genLayer2.addBiome("Desert", 35, 20)
genLayer2.addBiome("Desert", 1, 10)
genLayer2.setSpecialBiome("Desert", 38)
genLayer2.setSpecialVariantBiome("Desert", 39)

genLayer2.addBiome("Warm", 4, 10)
genLayer2.addBiome("Warm", 29, 10)
genLayer2.addBiome("Warm", 3, 10)
genLayer2.addBiome("Warm", 1, 10)
genLayer2.addBiome("Warm", 27, 10)
genLayer2.addBiome("Warm", 6, 10)
genLayer2.setSpecialBiome("Warm", 21)

genLayer2.addBiome("Cool", 4, 10)
genLayer2.addBiome("Cool", 3, 10)
genLayer2.addBiome("Cool", 5, 10)
genLayer2.addBiome("Cool", 1, 10)
genLayer2.setSpecialBiome("Cool", 32)

genLayer2.addBiome("Icy", 12, 30)
genLayer2.addBiome("Icy", 30, 10)

##########################################################################


genLayer2 = magnify(1000, genLayer2, 2)


##########################################################################

#Remove vanilla biome edge layer
#genLayer2 = new GenLayerBiomeEdge(1000, genLayer2)

#Add custom biome edge layer
genLayer2 = new GenLayerBiomeEdgeDC(1000, genLayer2)

genLayer2.addBiomeEdge([38, 39], null, [38, 39], 37)
genLayer2.addBiomeEdge(32, null, [5, 19, 30, 31, 32, 33, 133, 158, 160, 161], 5)
genLayer2.addBiomeEdge(2, 12, null, 34)
genLayer2.addBiomeEdge(6, [2, 30, 12], null, 1)
genLayer2.addBiomeEdge(6, 21, null, 23)

##########################################################################


##########################################################################

#Remove vanilla hill layer
genLayer2 = new GenLayerHills(1000, genLayer2, genLayer4)

#Add custom hill layer
genLayer2 = new GenLayerHillsDC(1000, genLayer2, genLayer4)

genLayer2.setMutation(1, 129)
genLayer2.setMutation(2, 130)
genLayer2.setMutation(3, 131)
genLayer2.setMutation(4, 132)
genLayer2.setMutation(5, 133)
genLayer2.setMutation(6, 134)
genLayer2.setMutation(12, 140)
genLayer2.setMutation(21, 149)
genLayer2.setMutation(23, 151)
#While not exactly vanilla, these next two are what was obviously meant to be vanilla. Actual vanilla would replace both with a single setMutation(27, 156)
genLayer2.setMutation(27, 155)
genLayer2.setMutation(28, 156)

genLayer2.setMutation(29, 157)
genLayer2.setMutation(30, 158)
genLayer2.setMutation(32, 160)
genLayer2.setMutation(33, 161)
genLayer2.setMutation(34, 162)
genLayer2.setMutation(35, 163)
genLayer2.setMutation(36, 164)
genLayer2.setMutation(37, 165)
genLayer2.setMutation(38, 166)
genLayer2.setMutation(39, 167)

genLayer2.setHill(2, 17)
genLayer2.setHill(4, 18)
genLayer2.setHill(27, 28)
genLayer2.setHill(29, 1)
genLayer2.setHill(5, 19)
genLayer2.setHill(32, 33)
genLayer2.setHill(30, 31)
genLayer2.setHill(1, [18, 4])
genLayer2.setHill(12, 13)
genLayer2.setHill(21, 22)
genLayer2.setHill(0, 24)
genLayer2.setHill(3, 34)
genLayer2.setHill(35, 36)
genLayer2.setHill(38, 37)
genLayer2.setHill(39, 37)
genLayer2.setHill(24, [4, 1, 24])

##########################################################################


genLayer3 = magnify(1000, genLayer3, 2)

genLayer3 = magnify(1000, genLayer3, 4)

genLayer3 = new GenLayerRiver(1, genLayer3)

genLayer3 = new GenLayerSmooth(1000, genLayer3)

genLayer2 = new GenLayerRareBiome(1001, genLayer2)

genLayer2 = new GenLayerZoom(1000, genLayer2)

genLayer2 = new GenLayerAddIsland(3, genLayer2)

genLayer2 = new GenLayerZoom(1001, genLayer2)


##########################################################################

#Remove vanilla shore layer
#genLayer2 = new GenLayerShore(1000, genLayer2)

#Add custom edge layer. 
genLayer2 = new GenLayerEdgeDC(1000, genLayer2)

genLayer2.addBiomeEdge(14, 0, null, 15)
genLayer2.addBiomeEdge([21, 22, 23, 149, 151], null, [21, 22, 23, 149, 151, 4, 5, 0, 24, 10], 23)
genLayer2.addBiomeEdge([21, 22, 23, 149, 151], [0, 24, 10], null, 16)
genLayer2.addBiomeEdge([3, 34, 20], [0, 24, 10], null, 25)
genLayer2.addBiomeEdge([11, 12, 13, 26, 30, 31, 140, 158], [0, 10, 24], null, 26)
genLayer2.addBiomeEdge(37, [0, 10, 24], null, 37)
genLayer2.addBiomeEdge(38, [0, 10, 24], null, 38)
genLayer2.addBiomeEdge([37, 38], null, [37, 38, 39, 165, 166, 167], 2)
#All biomes without a shore set yet other than swamp, river, ocean, deep ocean and frozen ocean set beach between them and oceanic
genLayer2.addBiomeEdge([1, 2, 4, 5, 8, 9, 15, 16, 17, 18, 19, 25, 27, 28, 29, 32, 33, 35, 36, 39, 127, 129, 130, 131, 132, 133, 134, 155, 156, 157, 160, 161, 162, 163, 164, 165, 166, 167], [0, 10, 24], null, 16)

##########################################################################


genLayer2 = magnify(1002, genLayer2, 2)

genLayer2 = new GenLayerSmooth(1000, genLayer2)


##########################################################################

#Remove vanilla river mix layer.
finalGenLayer1 = new GenLayerRiverMix(100, genLayer2, genLayer3)

#Add custom river mix layer
finalGenLayer1 = new GenLayerRiverMixDC(100, genLayer2, genLayer3)

finalGenLayer1.setRiverBiome(0, 0)
finalGenLayer1.setRiverBiome(24, 24)
finalGenLayer1.setRiverBiome(12, 11)
finalGenLayer1.setRiverBiome(14, 15)
finalGenLayer1.setRiverBiome(15, 15)

##########################################################################


finalGenLayer2 = new GenLayerVoronoiZoom(10, finalGenLayer1)

setGenLayers(finalGenLayer1, finalGenLayer2)
