Package forestry.api.genetics
Interface IMutation<S extends ISpecies<?>>
public interface IMutation<S extends ISpecies<?>>
Represents a mutation between two species (in any order) into a third species.
A mutation should never have both parents of the same species.
-
Method Summary
Modifier and TypeMethodDescriptionfloatnet.minecraft.world.item.ItemStackgetMutationNote(com.mojang.authlib.GameProfile researcher) ISpecies<?>getPartner(ISpecies<?> species) com.google.common.collect.ImmutableList<AllelePair<?>>Returns the allele pairs of individuals resulting from this mutation.List<net.minecraft.network.chat.Component>ISpeciesType<S,?> getType()booleanbooleanisSecret()
-
Method Details
-
getType
ISpeciesType<S,?> getType()- Returns:
ISpeciesTypethis mutation is associated with.
-
getFirstParent
S getFirstParent()- Returns:
- One of the species required for this mutation.
-
getSecondParent
S getSecondParent()- Returns:
- The other species required for this mutation.
-
getResult
S getResult()- Returns:
- The species resulting from this mutation.
-
getResultAlleles
com.google.common.collect.ImmutableList<AllelePair<?>> getResultAlleles()Returns the allele pairs of individuals resulting from this mutation. The ordering of the allele pairs matches the ordering of their respective chromosomes in theIKaryotypeof species type.- Returns:
- The list of alleles the resulting individual should have. Usually the default genome of result species.
-
getChance
float getChance()- Returns:
- Unmodified base chance for mutation to occur.
-
getSpecialConditions
List<net.minecraft.network.chat.Component> getSpecialConditions()- Returns:
- Collection of localized, human-readable strings describing special mutation conditions, if any.
-
getConditions
List<IMutationCondition> getConditions()- Returns:
- List of all conditions required for this mutation to occur.
-
isPartner
- Returns:
trueif the passed species is one of the alleles participating in this mutation.
-
getPartner
- Returns:
- The other parent in this mutation besides the given species.
-
isSecret
boolean isSecret()- Returns:
- true if the mutation should not be displayed in a gui that displays all mutations.
-
getMutationNote
net.minecraft.world.item.ItemStack getMutationNote(com.mojang.authlib.GameProfile researcher)
-