#Set all biomes to deep ocean
genLayer = new GenLayerBaseSingle(1, "deep_ocean")

#Randomly replace deep ocean with 8 touching deep ocean with jungle hills
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "deep_ocean", null, 8, "jungle_hills", 50)

#Zoom out in order to enlarge jungle hill biomes
genLayer = magnify(1000, genLayer, 4)

#Randomly replace deep ocean touching jungle hills with jungle hills. This is to add some texture to the hill biome shape.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle_hills", null, 1, "jungle_hills", 5)

#Replace all deep ocean touching jungle hills with jungle. This surrounds jungle hills completely with jungle.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle_hills", null, 1, "jungle")

#Randomly replace deep ocean touching jungle with jungle. This adds texture to the jungle biome shape.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle", null, 1, "jungle", 5)

#Zoom out in order to enlarge jungle and jungle hills biomes
genLayer = magnify(1000, genLayer, 4)

#Replace all deep ocean touching jungle with jungle edge. This surrounds the jungle with jungle edge.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle", null, 1, "jungle_edge")

#Randomly replace deep ocean touching jungle edge with jungle edge. This adds texture to the jungle edge biome shape.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle_edge", null, 1, "jungle_edge", 5)

#Zoom out in order to enlarge everything before this.
genLayer = magnify(1000, genLayer, 1)

#Randomly replace deep ocean touching jungle edge with beach. Doing this with only a 1/2 chance twice allows for most of the shore to be covered while still allowing there to be some jungle edge without beach.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle_edge", null, 1, "beaches", 2)
genLayer = new GenLayerTouching(1001, genLayer)
genLayer.addData("deep_ocean", "jungle_edge", null, 1, "beaches", 2)

#Replace all deep ocean touching jungle edge or beach with ocean. This surrounds the jungle edge and beach with ocean. Repeated once for a larger ocean area.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", "jungle_edge", null, 1, "ocean")
genLayer.addData("deep_ocean", "beaches", null, 1, "ocean")

#Replace all ocean touching 6 or more jungle edge or beaches biomes with jungle edge. This is to clean up the edges a bit, make sure inland ocean areas don't happen too often.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("ocean", ["jungle_edge", "beaches"], null, 6, "jungle_edge")

#Replace all deep ocean touching ocean with ocean. This is to increase the size of the ocean area without increasing the size of the beach area.
genLayer = new GenLayerTouching(1000, genLayer)
genLayer.addData("deep_ocean", 0, null, 1, "ocean")

#Zoom out to increase island size
genLayer = magnify(1000, genLayer, 2)

#Add voronoi zoom layer to the end of the chain for use as the second variable in the setGenLayers() call. This is always required.
finalGenLayer2 = new GenLayerVoronoiZoom(10, genLayer)

#Save the GenLayer chain. The first variable is used for terrain generation. The second variable is zoomed in 4x and is used for all other biome lookups.
setGenLayers(genLayer, finalGenLayer2)

