From 53172c38ad9e36dc1ae902c7c66ae31523da9af2 Mon Sep 17 00:00:00 2001 From: CeeVeeR Date: Fri, 2 Oct 2026 07:29:21 +0200 Subject: [PATCH] chore: - Extracted child style seed derivation to deriveChildStyleSeed Ref.: https://github.com/VolmitSoftware/Iris/issues/1251 --- .../iris/generation/terrain/IrisDimensionCarvingEntry.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/art/arcane/iris/generation/terrain/IrisDimensionCarvingEntry.java b/core/src/main/java/art/arcane/iris/generation/terrain/IrisDimensionCarvingEntry.java index f60072c5a..e7e94db73 100644 --- a/core/src/main/java/art/arcane/iris/generation/terrain/IrisDimensionCarvingEntry.java +++ b/core/src/main/java/art/arcane/iris/generation/terrain/IrisDimensionCarvingEntry.java @@ -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();