use of biomesoplenty.api.enums.BOPClimates in project BiomesOPlenty by Glitchfiend.
the class ModBiomes method registerBiome.
@Override
public IExtendedBiome registerBiome(IExtendedBiome extendedBiome, String idName) {
if (extendedBiome == null)
throw new IllegalArgumentException("Extended biome to register cannot be null!");
// Add to the set of present biomes
presentBiomes.add(extendedBiome.getBaseBiome());
// Extra functionality builtin, such as with BOPBiome
if (extendedBiome instanceof Biome) {
for (Entry<BOPClimates, Integer> entry : extendedBiome.getWeightMap().entrySet()) {
if (entry != null) {
BOPClimates climate = entry.getKey();
int weight = entry.getValue();
climate.addBiome(weight, extendedBiome.getBaseBiome());
}
}
} else // extendedBiome is a wrapper
{
biomeWrapperMap.put(Biome.getIdForBiome(extendedBiome.getBaseBiome()), extendedBiome);
}
return extendedBiome;
}
Aggregations