- Extracted entry id hashing to hashOfId

Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
CeeVeeR
2026-10-02 07:27:56 +02:00
parent ba4708f2bb
commit b998ff535a
@@ -81,8 +81,7 @@ public class IrisDimensionCarvingEntry {
}
public CNG getChildrenGenerator(long seed, IrisData data) {
String entryId = getId();
long idHash = entryId == null ? 0L : entryId.trim().hashCode();
long idHash = hashOfId();
long generatorSeed = seed ^ (idHash << 32) ^ 2137L;
return childGenerators.computeIfAbsent(generatorSeed, key -> {
double scale = Math.max(0.0001D, getChildShrinkFactor());
@@ -90,4 +89,9 @@ public class IrisDimensionCarvingEntry {
return getChildStyle().create(random.nextParallelRNG(2137), data).bake().scale(scale).bake();
});
}
private long hashOfId() {
String entryId = getId();
return entryId == null ? 0L : entryId.trim().hashCode();
}
}