Class GeneticTranslationKeys

java.lang.Object
forestry.api.core.genetics.GeneticTranslationKeys

public final class GeneticTranslationKeys extends Object
Builds the translation keys used for genetic objects: species of a species type, and alleles of a chromosome.
  • Method Details

    • createTranslationKey

      public static String createTranslationKey(String type, net.minecraft.resources.ResourceLocation typeId, net.minecraft.resources.ResourceLocation objectId)
      Creates a translation key for an OBJECT of a TYPE (ex. a SPECIES of a SPECIES TYPE, or an ALLELE of a CHROMOSOME) The format is as follows:
      • If typeId and objectId share the same namespace, the format is:
        TYPE.NAMESPACE.TYPEPATH.OBJECTPATH
      • If typeId and objectId have different namespaces, the format is:
        TYPE.TYPENAMESPACE.TYPEPATH.OBJECTNAMESPACE.OBJECTPATH
      For example, the Austere bee species from Forestry has the translation key:
      species.forestry.bee.austere
      and a bee species contributed by an add-on under its own namespace has the translation key:
      species.forestry.bee.myaddon.mybee
      Parameters:
      type - The first part of the translation key that describes the type of object this is. Can be empty.
      typeId - The ID of the type. An example would be the ID of the species type.
      objectId - The ID of the object. An example would be the ID of the species.
      Returns:
      The translation key.