use of org.blockartistry.mod.DynSurround.data.config.BiomeConfig in project BetterRain by OreCruncher.
the class BiomeRegistry method process.
private static void process(final BiomeConfig config) {
for (final BiomeConfig.Entry entry : config.entries) {
for (final Entry biomeEntry : registry.valueCollection()) {
if (isBiomeMatch(entry, resolveName(biomeEntry.biome))) {
if (entry.hasPrecipitation != null)
biomeEntry.hasPrecipitation = entry.hasPrecipitation.booleanValue();
if (entry.hasAurora != null)
biomeEntry.hasAurora = entry.hasAurora.booleanValue();
if (entry.hasDust != null)
biomeEntry.hasDust = entry.hasDust.booleanValue();
if (entry.hasFog != null)
biomeEntry.hasFog = entry.hasFog.booleanValue();
if (entry.fogDensity != null)
biomeEntry.fogDensity = entry.fogDensity.floatValue();
if (entry.fogColor != null) {
final int[] rgb = MyUtils.splitToInts(entry.fogColor, ',');
if (rgb.length == 3)
biomeEntry.fogColor = new Color(rgb[0], rgb[1], rgb[2]);
}
if (entry.dustColor != null) {
final int[] rgb = MyUtils.splitToInts(entry.dustColor, ',');
if (rgb.length == 3)
biomeEntry.dustColor = new Color(rgb[0], rgb[1], rgb[2]);
}
if (entry.soundReset != null && entry.soundReset.booleanValue()) {
biomeEntry.sounds = new ArrayList<SoundEffect>();
biomeEntry.spotSounds = new ArrayList<SoundEffect>();
}
if (entry.spotSoundChance != null)
biomeEntry.spotSoundChance = entry.spotSoundChance.intValue();
for (final SoundConfig sr : entry.sounds) {
if (SoundRegistry.isSoundBlocked(sr.sound))
continue;
final SoundEffect s = new SoundEffect(sr);
if (s.type == SoundType.SPOT)
biomeEntry.spotSounds.add(s);
else
biomeEntry.sounds.add(s);
}
}
}
}
}
Aggregations