Interface ISpeciesBuilder<T extends ISpeciesType<S,?>,S extends ISpecies<?>,B extends ISpeciesBuilder<T,S,B>>

All Known Subinterfaces:
IBeeSpeciesBuilder, IButterflySpeciesBuilder, ITreeSpeciesBuilder

public interface ISpeciesBuilder<T extends ISpeciesType<S,?>,S extends ISpecies<?>,B extends ISpeciesBuilder<T,S,B>>
Customize properties shared by all species types. Implement this class for your species type registration.
  • Method Details

    • setDominant

      B setDominant(boolean dominant)
      Overrides whether the allele of this species is dominant. Usually set first by a "registerSpecies" method parameter.
    • setGenome

      B setGenome(Consumer<IGenomeBuilder> genome)
    • addMutations

      B addMutations(Consumer<IMutationsRegistration> mutations)
      Define mutations that mutate into this species.
    • setGlint

      B setGlint(boolean glint)
      Specify whether item forms of this species will have an enchantment glint. Usually for rare/milestone species like Steadfast or Industrious. For trees and butterflies, only applies to their item forms, not their block/entity forms.
    • setTemperature

      B setTemperature(TemperatureType temperature)
      Sets the ideal temperature preference of this species. All species types in base Forestry use climate information. If a species type from an addon doesn't use this information, this method does nothing.
    • setHumidity

      B setHumidity(HumidityType humidity)
      Sets the ideal humidity preference of this species. All species types in base Forestry use climate information. If a species type from an addon doesn't use this information, this method does nothing.
    • setComplexity

      B setComplexity(int complexity)
      Overrides the default complexity of this species, a number between 1 and 10 used by the Escritoire to determine how many cells the memory game has when analyzing a specimen of this species. By default, complexity is determined by the number of breeding steps required to breed this species.
    • setEscritoireColor

      B setEscritoireColor(net.minecraft.network.chat.TextColor color)
      Sets the escritoire color of this species. Used for Escritoire game cells. If this method is never called, then the default escritoire color is -1. Usually, this method is optional and the color of the game cell is fetched from some other property. For example, bees use their outline color, and butterflies use their serum color. However, this property must be set manually in the case of tree species.
      Parameters:
      color - The color of the Escritoire memory cell when displaying this species.
    • setEscritoireColor

      @Deprecated(forRemoval=true) default B setEscritoireColor(Color color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use the variant that accepts a TextColor
    • setSecret

      B setSecret(boolean secret)
      Specify whether this bee species is a "secret" species whose mutation cannot be discovered in the Escritoire.

      Example species include:

      • Holiday species (Leporine, Merry, Tricky, Tipsy)
      • Iridium-producing species (Vindictive, Vengeful, Avenging)
      • Easter eggs like the secret Benson species from Career Bees
    • setAuthority

      B setAuthority(String authority)
      Sets the name of this species's discoverer. Most of the time, it is either Sengir, Binnie, or MysteriousAges.
      Parameters:
      authority - The name of the person who discovered this bee species.
    • setFactory

      B setFactory(ISpeciesBuilder.ISpeciesFactory<T,S,B> factory)
      Use a custom class for this species. Default is usually something like BeeSpecies::new.
    • getGenus

      String getGenus()
      Returns:
      The scientific name of the genus this species belongs to. Usually set when the builder is created.
    • getSpecies

      String getSpecies()
      Returns:
      The scientific name of the species without the genus. Usually set when the builder is created.
    • isDominant

      boolean isDominant()
      Returns:
      Whether alleles of this species are dominant. Set in setDominant(boolean).
    • buildGenome

      IGenome buildGenome(IGenomeBuilder builder)
      Used to create the default genome object for this species during registration.
      Parameters:
      builder - A genome builder with alleles set first by the karyotype, then by the parent taxa of this species.
      Returns:
      A completed default genome for this species, with all alleles that have been set in setGenome(java.util.function.Consumer<forestry.api.plugin.IGenomeBuilder>).
    • hasGlint

      boolean hasGlint()
      Returns:
      Whether the item form of this species has an enchantment glint. Set in setGlint(boolean).
    • getTemperature

      TemperatureType getTemperature()
    • getHumidity

      HumidityType getHumidity()
    • getComplexity

      int getComplexity()
    • getEscritoireColor

      int getEscritoireColor()
      Returns:
      The escritoire cell color of this species, or -1 if setEscritoireColor(net.minecraft.network.chat.TextColor) was not called.
    • isSecret

      boolean isSecret()
      Returns:
      Whether this species should be hidden in creative menus or JEI. Set in setSecret(boolean).
    • getAuthority

      String getAuthority()
      Returns:
      The name of who created this species. The default is "SirSengir". Set in setAuthority(java.lang.String).
    • createSpeciesFactory

      ISpeciesBuilder.ISpeciesFactory<T,S,B> createSpeciesFactory()
    • buildMutations

      List<IMutation<S>> buildMutations(ISpeciesType<S,?> speciesType, com.google.common.collect.ImmutableMap<net.minecraft.resources.ResourceLocation,S> speciesLookup)