use of forestry.api.core.EnumHumidity in project ForestryMC by ForestryMC.
the class ClimateGrowthProvider method isBiomeValid.
@Override
public boolean isBiomeValid(ITree tree, Biome biome) {
EnumTemperature biomeTemperature = EnumTemperature.getFromBiome(biome);
EnumHumidity biomeHumidity = EnumHumidity.getFromValue(biome.getRainfall());
ITreeGenome genome = tree.getGenome();
if (temperature == null) {
temperature = genome.getPrimary().getTemperature();
}
if (humidity == null) {
humidity = genome.getPrimary().getHumidity();
}
return AlleleManager.climateHelper.isWithinLimits(biomeTemperature, biomeHumidity, temperature, temperatureTolerance, humidity, humidityTolerance);
}
Aggregations