本文整理汇总了Java中forestry.api.genetics.IAlleleTolerance类的典型用法代码示例。如果您正苦于以下问题:Java IAlleleTolerance类的具体用法?Java IAlleleTolerance怎么用?Java IAlleleTolerance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAlleleTolerance类属于forestry.api.genetics包,在下文中一共展示了IAlleleTolerance类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addAlleleInfo
import forestry.api.genetics.IAlleleTolerance; //导入依赖的package包/类
@Override
protected void addAlleleInfo(GenomeAccess access, Map<String, Object> result) {
result.put("species", convertAllele(access, IAlleleSpecies.class, EnumBeeChromosome.SPECIES));
result.put("speed", convertAllele(access, IAlleleFloat.class, EnumBeeChromosome.SPEED));
result.put("lifespan", convertAllele(access, IAlleleInteger.class, EnumBeeChromosome.LIFESPAN));
result.put("fertility", convertAllele(access, IAlleleInteger.class, EnumBeeChromosome.FERTILITY));
result.put("temperatureTolerance", convertAllele(access, IAlleleTolerance.class, EnumBeeChromosome.TEMPERATURE_TOLERANCE));
result.put("nocturnal", convertAllele(access, IAlleleBoolean.class, EnumBeeChromosome.NOCTURNAL));
result.put("humidityTolerance", convertAllele(access, IAlleleTolerance.class, EnumBeeChromosome.HUMIDITY_TOLERANCE));
result.put("tolerantFlyer", convertAllele(access, IAlleleBoolean.class, EnumBeeChromosome.TOLERANT_FLYER));
result.put("caveDwelling", convertAllele(access, IAlleleBoolean.class, EnumBeeChromosome.CAVE_DWELLING));
result.put("flowerProvider", convertAllele(access, IAlleleFlowers.class, EnumBeeChromosome.FLOWER_PROVIDER));
result.put("flowering", convertAllele(access, IAlleleInteger.class, EnumBeeChromosome.FLOWERING));
result.put("effect", convertAllele(access, IAlleleBeeEffect.class, EnumBeeChromosome.EFFECT));
result.put("territory", convertAllele(access, IAlleleArea.class, EnumBeeChromosome.TERRITORY));
}
示例2: canWorkInTemperature
import forestry.api.genetics.IAlleleTolerance; //导入依赖的package包/类
public boolean canWorkInTemperature(EnumTemperature temp) {
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()];
return AlleleManager.climateHelper
.isWithinLimits(temp, EnumHumidity.NORMAL, temperature, tolerance.getValue(), EnumHumidity.NORMAL, EnumTolerance.NONE);
}
示例3: canWorkInHumidity
import forestry.api.genetics.IAlleleTolerance; //导入依赖的package包/类
public boolean canWorkInHumidity(EnumHumidity humid) {
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()];
return AlleleManager.climateHelper.isWithinLimits(EnumTemperature.NORMAL, humid, EnumTemperature.NORMAL, EnumTolerance.NONE, humidity,
tolerance.getValue());
}