Cave profile tests on the overworld pack's JSON; carvers read the profile through ResolvedCaveProfile; IrisValues exposes the style, range conversions

This commit is contained in:
piexel committed 2026-10-09 22:12:02 +02:00
1 parent bc6d4e8857
commit d72c96b166
8 files changed
+339 -188

No files matched your search

@@ -91,8 +91,11 @@ public final class IrisValues {
return map;
}
/** {@code style} as the generator style Iris builds noise from; a style name Iris does not know is flat. */
static IrisGeneratorStyle generatorStyle(com.volmit.noise.NoiseStyle style) {
/**
* {@code style} as the generator style Iris builds noise from; a style name Iris does not know is flat. For behaviour that
* reads Iris's generator itself, such as the cave carvers' signed 3D reads, which {@code PackResources.noise()} does not offer.
*/
public static IrisGeneratorStyle generatorStyle(com.volmit.noise.NoiseStyle style) {
IrisGeneratorStyle iris = new IrisGeneratorStyle(irisStyle(style.style()));
iris.setCellularFrequency(style.cellularFrequency());
iris.setCellularZoom(style.cellularZoom());
@@ -106,6 +109,16 @@ public final class IrisValues {
return iris;
}
/** {@code range} as the range Iris reads the same JSON into. */
public static IrisRange range(Range range) {
return new IrisRange(range.min(), range.max());
}
/** {@code range} as the styled range Iris reads the same JSON into. */
public static IrisStyledRange styledRange(StyledRange range) {
return new IrisStyledRange(range.min(), range.max(), generatorStyle(range.style()));
}
private static NoiseStyle irisStyle(String name) {
try {
return NoiseStyle.valueOf(name);