//Sets the spawn structure at y 100
setSpawnStructure("cave", 100)

//Creates a new LayerGenerator and saves it as a variable
layers = new LayerGenerator()

//Adds a layer of water from y 301 to y 301
layers.addLayer(201~201, <minecraft:bedrock>)

//Adds a layer of stone from y 0 to y 300
layers.addLayer(1~200, <minecraft:stone>)

//Adds a layer of water from y 2 to y 60
layers.addLayer(0~0, <minecraft:bedrock>)

//Adds the layer generator to the dimension
addGenerator(layers)