Code/net/minecraft/world/level/levelgen/WorldGenerationContext.java

22 lines
633 B
Java
Raw Normal View History

2025-07-01 06:20:03 +00:00
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 p_182507_, LevelHeightAccessor p_182508_) {
this.minY = Math.max(p_182508_.getMinY(), p_182507_.getMinY());
this.height = Math.min(p_182508_.getHeight(), p_182507_.getGenDepth());
}
public int getMinGenY() {
return this.minY;
}
public int getGenDepth() {
return this.height;
}
}