use of hellfirepvp.astralsorcery.common.constellation.IConstellationSpecialShowup in project AstralSorcery by HellFirePvP.
the class DistributionHandler method updateDistribution.
private void updateDistribution(World world) {
MoonPhase current = MoonPhase.fromWorld(world);
Map<IConstellation, Float> distribution = new HashMap<>(this.dayDistributionMap.get(current.ordinal()));
for (IConstellationSpecialShowup special : ConstellationRegistry.getSpecialShowupConstellations()) {
if (special.doesShowUp(world, lastRecordedDay)) {
distribution.put(special, MathHelper.clamp(special.getDistribution(world, lastRecordedDay, true), 0F, 1F));
} else {
distribution.put(special, MathHelper.clamp(special.getDistribution(world, lastRecordedDay, false), 0F, 1F));
}
}
this.activeDistribution = distribution;
}
Aggregations