Package forestry.api.core.genetics
Class GeneticTranslationKeys
java.lang.Object
forestry.api.core.genetics.GeneticTranslationKeys
Builds the translation keys used for genetic objects: species of a species type, and alleles of a
chromosome.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateTranslationKey(String type, net.minecraft.resources.ResourceLocation typeId, net.minecraft.resources.ResourceLocation objectId) Creates a translation key for an OBJECT of a TYPE (ex.
-
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
typeIdandobjectIdshare the same namespace, the format is:
TYPE.NAMESPACE.TYPEPATH.OBJECTPATH - If
typeIdandobjectIdhave different namespaces, the format is:
TYPE.TYPENAMESPACE.TYPEPATH.OBJECTNAMESPACE.OBJECTPATH
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.
- If
-