mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 13:30:08 +00:00
chore:
- Extracted magic value 2137 to CHILDREN_SEED_SALT Ref.: https://github.com/VolmitSoftware/Iris/issues/1251
This commit is contained in:
1 parent
5b5c1975c6
commit
ffc409a4ac
1 file changed
+3
-2
+3
-2
@@ -31,6 +31,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
@Description("Dimension-level cave biome override with absolute world Y bounds.")
|
@Description("Dimension-level cave biome override with absolute world Y bounds.")
|
||||||
@Data
|
@Data
|
||||||
public class IrisDimensionCarvingEntry {
|
public class IrisDimensionCarvingEntry {
|
||||||
|
private static final int CHILDREN_SEED_SALT = 2137;
|
||||||
private final transient AtomicCache<IrisBiome> realBiome = new AtomicCache<>(true);
|
private final transient AtomicCache<IrisBiome> realBiome = new AtomicCache<>(true);
|
||||||
private final transient Map<Long, CNG> childGenerators = new ConcurrentHashMap<>();
|
private final transient Map<Long, CNG> childGenerators = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@@ -89,11 +90,11 @@ public class IrisDimensionCarvingEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
long deriveChildrenGeneratorSeed(long worldSeed) {
|
long deriveChildrenGeneratorSeed(long worldSeed) {
|
||||||
return worldSeed ^ (hashOfId() << 32) ^ 2137L;
|
return worldSeed ^ (hashOfId() << 32) ^ CHILDREN_SEED_SALT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static RNG deriveChildStyleSeed(long childrenGeneratorSeed) {
|
static RNG deriveChildStyleSeed(long childrenGeneratorSeed) {
|
||||||
return new RNG(childrenGeneratorSeed).nextParallelRNG(2137);
|
return new RNG(childrenGeneratorSeed).nextParallelRNG(CHILDREN_SEED_SALT);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CNG scaleByShrinkFactor(CNG generator) {
|
private CNG scaleByShrinkFactor(CNG generator) {
|
||||||
|
|||||||
Reference in new issue
Block a user