mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 14:00:26 +00:00
Read ore chance cache first
- Skip the capturing supplier allocation once the chance noise exists
This commit is contained in:
1 parent
ec1984949b
commit
066017cdf6
1 file changed
+4
-1
@@ -71,7 +71,10 @@ public class IrisOreGenerator {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
CNG chance = chanceCache.aquire(() -> chanceStyle.create(rng, data));
|
CNG chance = chanceCache.getIfPresent();
|
||||||
|
if (chance == null) {
|
||||||
|
chance = chanceCache.aquire(() -> chanceStyle.create(rng, data));
|
||||||
|
}
|
||||||
|
|
||||||
if (chance.noise(x, y, z) > threshold) {
|
if (chance.noise(x, y, z) > threshold) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in new issue
Block a user