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 Details

    • getType

      ISpeciesType<S,?> getType()
      Returns:
      ISpeciesType this 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 the IKaryotype of 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

      boolean isPartner(ISpecies<?> species)
      Returns:
      true if the passed species is one of the alleles participating in this mutation.
    • getPartner

      ISpecies<?> getPartner(ISpecies<?> species)
      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)