// Skip if we are restricted by biomes and this one does not match.
if (restrictBiomeTypes.size() > 0) {
boolean noneMatched = true;
BiomeGenBase biome = BiomeGenBase.getBiome(housing.getBiomeId());
if(strictBiomeCheck) {
BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(biome);
if(types.length == 1 && restrictBiomeTypes.contains(types[0]))
noneMatched = false;
} else {
for(BiomeDictionary.Type type : restrictBiomeTypes) {
if(BiomeDictionary.isBiomeOfType(biome, type)) {
noneMatched = false;
break;
}
}
}
if (noneMatched)
return 0;
}
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(housing.getXCoord(), housing.getZCoord());
if (biome.temperature < minTemperature || biome.temperature > maxTemperature)
return 0;
if (biome.rainfall < minRainfall || biome.rainfall > maxRainfall)
return 0;