use of forestry.api.apiculture.IAlleleBeeSpecies in project LogisticsPipes by RS485.
the class ForestryProxy method getIconIndexForAlleleId.
/**
* Used to get an icon index for a given allele.
*
* @param uid
* The uid String of the allele to get icon index for.
* @param phase
* special phase of the bee.
*/
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconIndexForAlleleId(String uid, int phase) {
IAllele bSpecies = forestry.api.genetics.AlleleManager.alleleRegistry.getAllele(uid);
if (!(bSpecies instanceof IAlleleBeeSpecies)) {
bSpecies = root.getDefaultTemplate()[forestry.api.apiculture.EnumBeeChromosome.SPECIES.ordinal()];
}
IAlleleBeeSpecies species = (IAlleleBeeSpecies) bSpecies;
return species.getIcon(EnumBeeType.DRONE, phase);
}
Aggregations