- Extracted child shrink scaling to scaleByShrinkFactor

Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
CeeVeeR committed 2026-10-02 07:29:53 +02:00
1 parent 53172c38ad
commit 9e07009f1d
1 file changed
+5 -2
@@ -82,8 +82,7 @@ public class IrisDimensionCarvingEntry {
public CNG getChildrenGenerator(long seed, IrisData data) {
return childGenerators.computeIfAbsent(deriveChildrenGeneratorSeed(seed), key -> {
double scale = Math.max(0.0001D, getChildShrinkFactor());
return getChildStyle().create(deriveChildStyleSeed(key), data).bake().scale(scale).bake();
return scaleByShrinkFactor(getChildStyle().create(deriveChildStyleSeed(key), data));
});
}
@@ -95,6 +94,10 @@ public class IrisDimensionCarvingEntry {
return new RNG(childrenGeneratorSeed).nextParallelRNG(2137);
}
private CNG scaleByShrinkFactor(CNG generator) {
return generator.bake().scale(Math.max(0.0001D, getChildShrinkFactor())).bake();
}
private long hashOfId() {
String entryId = getId();
return entryId == null ? 0L : entryId.trim().hashCode();