Search in sources :

Example 1 with IAlleleBeeSpecies

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);
}
Also used : IAllele(forestry.api.genetics.IAllele) IAlleleBeeSpecies(forestry.api.apiculture.IAlleleBeeSpecies) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

SideOnly (cpw.mods.fml.relauncher.SideOnly)1 IAlleleBeeSpecies (forestry.api.apiculture.IAlleleBeeSpecies)1 IAllele (forestry.api.genetics.IAllele)1