Package forestry.api.plugin
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 Summary
Modifier and TypeMethodDescription<A extends IAllele>
IChromosomeBuilder<A>get(IChromosome<A> chromosome) Used to modify a chromosome already added inset(forestry.api.genetics.alleles.IChromosome<A>, A).default IChromosomeBuilder<IBooleanAllele>set(IBooleanChromosome chromosome, boolean defaultAllele) Overload ofset(IRegistryChromosome, ResourceLocation)for booleans.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.voidset(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.voidsetSpecies(IRegistryChromosome<? extends ISpecies<?>> species, net.minecraft.resources.ResourceLocation defaultId) Sets the species chromosome of the karyotype for this species type.
-
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
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 IChromosomeBuilder<IBooleanAllele> set(IBooleanChromosome chromosome, boolean defaultAllele) Overload ofset(IRegistryChromosome, ResourceLocation)for booleans. -
set
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
Used to modify a chromosome already added inset(forestry.api.genetics.alleles.IChromosome<A>, A).- Returns:
- The
IChromosomeBuilderfor this chromosome in the karyotype. - Throws:
IllegalArgumentException- If the chromosome is not contained in this genome.
-