Interface ITaxonBuilder


public interface ITaxonBuilder
Builder for a taxon that allows defining subtaxa and adding species to a taxon.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Defines a taxon with this taxon as the its parent.
    void
    Defines and configures a taxon with this taxon as its parent.
    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.
    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.
    default <V> void
    setDefaultChromosome(IChromosome<V> chromosome, Allele<V> allele)
    Sets the default allele of a data chromosome for all members of this taxon.
    <V> void
    setDefaultChromosome(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

      void defineSubTaxon(String name)
      Defines a taxon with this taxon as the its parent. Do not use with species names, species are set by the ISpeciesBuilder.
      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

      void defineSubTaxon(String name, Consumer<ITaxonBuilder> action)
      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

      default <V> void setDefaultChromosome(IChromosome<V> chromosome, Allele<V> allele)
      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

      <V> void setDefaultChromosome(IChromosome<V> chromosome, Allele<V> allele, boolean required)
      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 - If true, 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 - If true, members of the taxon are expected to have this chromosome.