--- a/net/minecraft/world/level/levelgen/WorldGenerationContext.java
+++ b/net/minecraft/world/level/levelgen/WorldGenerationContext.java
@@ -6,8 +_,15 @@
 public class WorldGenerationContext {
     private final int minY;
     private final int height;
+    // Paper start - Flat bedrock generator settings
+    private final @javax.annotation.Nullable net.minecraft.world.level.Level serverLevel;
 
     public WorldGenerationContext(ChunkGenerator generator, LevelHeightAccessor level) {
+        this(generator, level, null);
+    }
+    public WorldGenerationContext(ChunkGenerator generator, LevelHeightAccessor level, net.minecraft.world.level.Level serverLevel) {
+        this.serverLevel = serverLevel;
+        // Paper end - Flat bedrock generator settings
         this.minY = Math.max(level.getMinY(), generator.getMinY());
         this.height = Math.min(level.getHeight(), generator.getGenDepth());
     }
@@ -19,4 +_,13 @@
     public int getGenDepth() {
         return this.height;
     }
+
+    // Paper start - Flat bedrock generator settings
+    public net.minecraft.world.level.Level level() {
+        if (this.serverLevel == null) {
+            throw new NullPointerException("WorldGenerationContext was initialized without a Level, but WorldGenerationContext#level was called");
+        }
+        return this.serverLevel;
+    }
+    // Paper end - Flat bedrock generator settings
 }
