-
Notifications
You must be signed in to change notification settings - Fork 55
Tag Translation
EMI displays tags to users in recipes when applicable. When launching your game in a dev environment, EMI should warn you when untranslated tags exist in your workspace (these will also be logged). If you are a modpack maker in a release environment, you can enable this by going into the EMI config and, under the dev section, enabling both "dev mode" and "log untranslated tags" and running /reload
.
You can translate tags by, in your lang file, adding entries for each tag you provide. For instance, the item tag #minecraft:logs
would use "tag.item.minecraft.logs"
as a language key. Lang files do not use /
characters, so in tags that are in subfolders, this should be replaced with a .
. For example, #c:crops/carrot
would use "tag.item.c.crops.carrot"
as a language key.
You do not need to translate every tag EMI notes if you are not responsible for them. Generally, you should only translate tags if they are in your namespace, or you add them to the c
Common or forge
Forge namespaces. When translating tags, they should generally be plural names of what they represent. For instance, #c:ingots/copper
is translated as "Copper Ingots". If you need an idea of what format EMI typically displays in, all of the default translations can be found in the lang file.
Sometimes, however, you do not want to display tags to a user. They may be redundant, overlap with a much more reasonable tag, or be noisy information that will not help players. In that case, you can tell EMI to simply not consider certain tags as existing. This can be done by creating a file in a resource pack (note: not a data pack, EMI is client sided) at assets/emi/tag/exclusions/[modid].json
, replacing [modid] with your mod id, or some unique identifier for your pack. A simple example of exclusions can be seen below.
{
"item": [
"mymod:trashable",
"mymod:contains_all_wools_but_has_a_worse_name",
"mymod:is_a_duplicate_of_a_vanilla_tag"
]
}
Additionally, EMI supports models for tags. By default, EMI will show the first element in a tag and use it as its donor item, but sometimes this is ambiguous or undesired. In a resource pack, you can create a model for a tag under assets/[namespace]/models/tag/[type]/[path].json
. For example, #minecraft:coals
would be assets/minecraft/models/tag/item/coals.json
. These models are standard item models, and can display whatever an item can. For convenience, EMI provides two models that can be used as parents for a commonly used display method. These models are emi:item/half_item
and emi:item/quarter_item
. The names should be self explanatory. Here is an example of the #minecraft:coals
model using coal as its left half and charcoal as its right half:
{
"parent": "emi:item/half_item",
"textures": {
"first": "minecraft:item/coal",
"second": "minecraft:item/charcoal"
}
}