mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-22 08:07:42 +00:00
chore:
- Extracted child shrink scaling to scaleByShrinkFactor Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
1 parent
53172c38ad
commit
9e07009f1d
1 file changed
+5
-2
+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();
|
||||
|
||||
Reference in new issue
Block a user