- Extracted child style seed derivation to deriveChildStyleSeed

Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
CeeVeeR
2026-10-02 07:29:21 +02:00
parent 658c6b0fde
commit 53172c38ad
@@ -83,8 +83,7 @@ public class IrisDimensionCarvingEntry {
public CNG getChildrenGenerator(long seed, IrisData data) {
return childGenerators.computeIfAbsent(deriveChildrenGeneratorSeed(seed), key -> {
double scale = Math.max(0.0001D, getChildShrinkFactor());
RNG random = new RNG(key);
return getChildStyle().create(random.nextParallelRNG(2137), data).bake().scale(scale).bake();
return getChildStyle().create(deriveChildStyleSeed(key), data).bake().scale(scale).bake();
});
}
@@ -92,6 +91,10 @@ public class IrisDimensionCarvingEntry {
return worldSeed ^ (hashOfId() << 32) ^ 2137L;
}
static RNG deriveChildStyleSeed(long childrenGeneratorSeed) {
return new RNG(childrenGeneratorSeed).nextParallelRNG(2137);
}
private long hashOfId() {
String entryId = getId();
return entryId == null ? 0L : entryId.trim().hashCode();