22 lines
574 B
Java
22 lines
574 B
Java
package net.minecraft.world.level.levelgen;
|
|
|
|
import net.minecraft.world.level.LevelHeightAccessor;
|
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
|
|
|
public class WorldGenerationContext {
|
|
private final int minY;
|
|
private final int height;
|
|
|
|
public WorldGenerationContext(ChunkGenerator generator, LevelHeightAccessor level) {
|
|
this.minY = Math.max(level.getMinY(), generator.getMinY());
|
|
this.height = Math.min(level.getHeight(), generator.getGenDepth());
|
|
}
|
|
|
|
public int getMinGenY() {
|
|
return this.minY;
|
|
}
|
|
|
|
public int getGenDepth() {
|
|
return this.height;
|
|
}
|
|
}
|