Package forestry.api.genetics
Interface ISpecies<I extends IIndividual>
- All Superinterfaces:
IRegistryAlleleValue
- All Known Subinterfaces:
IBeeSpecies,IButterflySpecies,ITreeSpecies
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTooltip(I individual, List<net.minecraft.network.chat.Component> tooltip) default <S extends ISpecies<?>>
Scast()default IcreateIndividual(IGenome genome) Creates an individual of this species using the specified genome.createIndividual(Map<IChromosome<?>, IAllele> alleles) Creates an individual of this species using the default genome and the added alleles.createIndividualFromPairs(Map<IChromosome<?>, AllelePair<?>> allelePairs) default net.minecraft.world.item.ItemStackcreateStack(ILifeStage stage) default net.minecraft.world.item.ItemStackcreateStack(I individual, ILifeStage stage) intdefault Stringdefault net.minecraft.network.chat.MutableComponentintgetGenus()default Stringdefault IKaryotypeISpeciesType<? extends ISpecies<I>,I> getType()booleanhasGlint()net.minecraft.resources.ResourceLocationid()booleanbooleanisSecret()
-
Method Details
-
getTranslationKey
String getTranslationKey()- Returns:
- The translation key for the human-readable name of this species.
-
getDisplayName
default net.minecraft.network.chat.MutableComponent getDisplayName()- Returns:
- The human-readable name of this species.
-
getDescriptionTranslationKey
- Returns:
- The translation key for the description of this species used by the Portable Analyzer.
-
getDefaultGenome
IGenome getDefaultGenome()- Returns:
- The default genome for this species.
-
id
net.minecraft.resources.ResourceLocation id()- Returns:
- The unique identifier of this species. Also the allele ID for this species.
-
getBinomial
String getBinomial()- Returns:
- The scientific name of this species, including the genus and species.
-
getSpeciesName
String getSpeciesName()- Returns:
- The scientific species name, the second half of the scientific name after the genus.
-
getGenus
ITaxon getGenus()- Returns:
- The genus of this species.
-
getGenusName
-
getType
ISpeciesType<? extends ISpecies<I>,I> getType()- Returns:
- The type of species this is.
-
isSecret
boolean isSecret()- Returns:
- Whether this species is "secret" (Ex. Easter egg bee or extremely rare tree/butterfly)
-
getComplexity
int getComplexity() -
createStack
-
createStack
-
createIndividual
Creates an individual of this species using the default genome and the added alleles.- Parameters:
alleles- A map of alleles to set on this individual upon creation. Any missing chromosomes use default alleles.- Returns:
- An individual along with any specified alleles.
-
createIndividualFromPairs
-
createIndividual
Creates an individual of this species using the specified genome.- Parameters:
genome- The genome for this individual.- Returns:
- The new individual.
- Throws:
IllegalArgumentException- If the genome's karyotype does not match this species.
-
createIndividual
- Returns:
- A new individual of this species using the default genome.
-
getKaryotype
-
hasGlint
boolean hasGlint()- Returns:
- Whether the item form of this species has an enchantment glint.
-
isDominant
boolean isDominant()- Specified by:
isDominantin interfaceIRegistryAlleleValue- Returns:
- Whether the allele for this species is dominant or recessive.
-
getAuthority
String getAuthority() -
getEscritoireColor
int getEscritoireColor()- Returns:
- The color of cells that contain this species in the Escritoire research game
-
cast
-
addTooltip
-