Package forestry.api.plugin
Interface IGenomeBuilder
public interface IGenomeBuilder
Used to create a genome. Alleles are inline values (
Allele); reference chromosomes accept a
ResourceLocation which is resolved (with the value's default dominance) at apply time.-
Method Summary
Modifier and TypeMethodDescriptionbuild()booleanisEmpty()default voidset(IChromosome<Boolean> chromosome, boolean value) Shortcut for setting a dominant boolean allele.voidset(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id) Sets a reference chromosome (species, flower type, effect, ...) by the referenced value's ID.<V> voidset(IChromosome<V> chromosome, Allele<V> allele) Sets both the active and inactive allele for the chromosome.<V> voidsetActive(IChromosome<V> chromosome, Allele<V> allele) Sets the active (expressed) allele for the chromosome.<V> voidsetInactive(IChromosome<V> chromosome, Allele<V> allele) Sets the inactive (non-expressed) allele for the chromosome.voidSets the remaining unset chromosomes to their karyotype defaults.default voidsetUnchecked(IChromosome chromosome, AllelePair allele)
-
Method Details
-
set
Shortcut for setting a dominant boolean allele. -
setUnchecked
-
set
Sets both the active and inactive allele for the chromosome. -
set
void set(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id) Sets a reference chromosome (species, flower type, effect, ...) by the referenced value's ID. The value's declared dominance is resolved at apply time. -
setActive
Sets the active (expressed) allele for the chromosome. -
setInactive
Sets the inactive (non-expressed) allele for the chromosome. -
build
IGenome build()- Returns:
- A new genome. Later modifications to this builder will not affect the returned genome.
-
isEmpty
boolean isEmpty()- Returns:
trueif no chromosomes were set in this genome.
-
setRemainingDefault
void setRemainingDefault()Sets the remaining unset chromosomes to their karyotype defaults.
-