Interface IKaryotypeBuilder


public interface IKaryotypeBuilder
Used to configure the the default set of chromosomes, called the karyotype, of a species. Also configures the default genome.
  • Method Details

    • setSpecies

      void setSpecies(IRegistryChromosome<? extends ISpecies<?>> species, net.minecraft.resources.ResourceLocation defaultId)
      Sets the species chromosome of the karyotype for this species type.
      Parameters:
      species - The species chromosome.
      defaultId - The ID of the default species, used as a fallback when a genome is not available or corrupt.
    • set

      default <A extends IAllele> IChromosomeBuilder<A> set(IChromosome<A> chromosome, A defaultAllele)
      Sets the default allele of the chromosome in this karyotype and adds the chromosome if not already present.
      Parameters:
      chromosome - The chromosome to add.
      defaultAllele - The default value of the chromosome.
    • set

      default void set(IBooleanChromosome chromosome, boolean defaultAllele)
      Overload of set(IRegistryChromosome, ResourceLocation) for default booleans.
    • set

      void set(IRegistryChromosome<?> chromosome, net.minecraft.resources.ResourceLocation defaultId)
      Sets the default allele of the chromosome in this karyotype and adds the chromosome if not already present.
      Parameters:
      chromosome - The chromosome to add.
      defaultId - The ID of the default allele.
    • get

      <A extends IAllele> IChromosomeBuilder<A> get(IChromosome<A> chromosome)
      Used to modify a chromosome already added in set(forestry.api.genetics.alleles.IChromosome<A>, A).
      Returns:
      The IChromosomeBuilder for this chromosome in the karyotype.
      Throws:
      IllegalArgumentException - If the chromosome is not contained in this genome.