use of forestry.api.apiculture.IBeeModifier in project ForestryMC by ForestryMC.
the class BeekeepingMode method isDegenerating.
@Override
public boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing) {
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
float mutationModifier = beeModifier.getMutationModifier(queen.getGenome(), queen.getMate(), 1.0f);
if (mutationModifier > 10) {
if (housing.getWorldObj().rand.nextFloat() * 100 < 0.4 * (mutationModifier * mutationModifier - 100)) {
return true;
}
}
return false;
}
Aggregations