Package forestry.api.plugin
Interface ITaxonBuilder
public interface ITaxonBuilder
Builder for a taxon that allows defining subtaxa and adding species to a taxon.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefineSubTaxon(String name) Defines a taxon with this taxon as the its parent.voiddefineSubTaxon(String name, Consumer<ITaxonBuilder> action) Defines and configures a taxon with this taxon as its parent.default voidsetDefaultChromosome(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id) Sets the default value of a reference chromosome (species, flower type, effect, ...) for all members of this taxon by the referenced value's ID.voidsetDefaultChromosome(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id, boolean required) Sets the default value of a reference chromosome for all members of this taxon by the referenced value's ID.default <V> voidsetDefaultChromosome(IChromosome<V> chromosome, Allele<V> allele) Sets the default allele of a data chromosome for all members of this taxon.<V> voidsetDefaultChromosome(IChromosome<V> chromosome, Allele<V> allele, boolean required) Sets the default allele of a data chromosome for all members of this taxon.
-
Method Details
-
defineSubTaxon
Defines a taxon with this taxon as the its parent. Do not use with species names, species are set by theISpeciesBuilder.- Parameters:
name- The name of the taxon. Must be unique.- Throws:
UnsupportedOperationException- If this taxon is a genus. Species names are set by the species builder.
-
defineSubTaxon
Defines and configures a taxon with this taxon as its parent.- Parameters:
name- The name of the taxon. Must be unique.action- A consumer that adds additional information to the taxon after it is created.
-
setDefaultChromosome
Sets the default allele of a data chromosome for all members of this taxon.- Parameters:
chromosome- The chromosome to set.allele- The default allele of the chromosome.
-
setDefaultChromosome
Sets the default allele of a data chromosome for all members of this taxon.- Parameters:
chromosome- The chromosome to set.allele- The default allele of this chromosome.required- Iftrue, members of the taxon are expected to have this chromosome.
-
setDefaultChromosome
default void setDefaultChromosome(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id) Sets the default value of a reference chromosome (species, flower type, effect, ...) for all members of this taxon by the referenced value's ID. The value's declared dominance is resolved after registries are populated.- Parameters:
chromosome- The reference chromosome to set.id- The ID of the default referenced value.
-
setDefaultChromosome
void setDefaultChromosome(IChromosome<net.minecraft.resources.ResourceLocation> chromosome, net.minecraft.resources.ResourceLocation id, boolean required) Sets the default value of a reference chromosome for all members of this taxon by the referenced value's ID.- Parameters:
chromosome- The reference chromosome to set.id- The ID of the default referenced value.required- Iftrue, members of the taxon are expected to have this chromosome.
-