mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +00:00
Read ore chance cache first
- Skip the capturing supplier allocation once the chance noise exists
This commit is contained in:
@@ -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