mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-22 08:07:42 +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;
|
||||
}
|
||||
|
||||
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) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user