//Sets the DimensionDefinition for dimension 0 and stores it as a variable.
overworld = setDimensionDefinition(0)

//Adds a BlockReplacement of type "Simple" to the DimensionDefinition variable we named "overworld", and configures it to replace bedrock with stone.
replacement = overworld.addBlockReplacement("Simple")

//This generation point is just after bedrock is placed.
replacement.addGenerationPoint("POPULATE_CHUNK_PRE")
replacement.setBlockToReplace("minecraft:bedrock")
replacement.setReplacement("minecraft:stone")

//Bedrock can spawn at a max level of 4, and we want to leave a layer of it.
replacement.setMaxHeight(4)
replacement.setMinHeight(1)