TerrainSampler.surfaceBiome: the id of a column's surface biome alone

This commit is contained in:
piexel committed 2026-10-12 02:19:48 +02:00
1 parent dfdda39667
commit 6e53d7b723
1 file changed
+8
@@ -1,6 +1,7 @@
package com.volmit.world;
import com.volmit.block.BlockState;
import com.volmit.resource.ResourceId;
import com.volmit.mantle.BlockBox;
import java.util.Optional;
import java.util.OptionalInt;
@@ -33,6 +34,13 @@ public interface TerrainSampler {
*/
OptionalInt upperDimensionY(int worldX, int worldZ);
/** The id of the column's surface biome, as {@link BiomeSample#surfaceBiome()} gives it, for a module that asks about every
* column of a chunk and has no use for the rest of the sample. The host may answer it without working out the cave biome.
*/
default ResourceId surfaceBiome(int worldX, int worldZ) {
return biome(worldX, bounds().minY(), worldZ).surfaceBiome();
}
/** What the surface biome of the column was generated as. A cave biome ({@link BiomeSample#caveBiome()}) is always
* {@link BiomeKind#CAVE}, so the answer is about the surface biome only. Outside the bounds it throws like {@link #column}.
*/