WesCook / Nutrition

A Minecraft mod that ensures you eat healthy.
MIT License
112 stars 39 forks source link

New food groups name display #228

Closed Inverseder closed 3 years ago

Inverseder commented 3 years ago

Hello, I'm a modpack maker and I try to had a new nutrient but the name displays improperly. I see your post here https://github.com/WesCook/Nutrition/wiki/Nutrients that i need to use resource loader. I use it and create a json file named en_us to display the correct name with this path: resources\assets\nutrition\lang\enus.json . In the json file I write this entry: { "nutrient.nutrition:sugar":"Sugar" }_ But it doesnt change anything. I join here the new nutrient I have made:

{ "name": "sugar", "icon": "minecraft:sugar", "color": "ffffff", "enabled": true, "food": { "oredict": [

    ],
    "items": [
        "aoa3:candy_cane",
        "aoa3:candy_corn",
        "aoa3:eye_cand",
        "aoa3:floracle_sticks",
        "harvestcraft:caramelitem",
        "harvestcraft:marshmellowsitem"
    ]
}

}

Can you help me please? Don't know what I'm doing wrong

WesCook commented 3 years ago

The language files aren't json. They're just simple key=value pairs. You can see an example of Nutrition's localization file here: https://github.com/WesCook/Nutrition/blob/1.12/src/main/resources/assets/nutrition/lang/en_us.lang

So for Resource Loader, you'd create a file at /oresources/nutrition/lang/en_us.lang and use the same format as above.

Give that a try and let me know.

Inverseder commented 3 years ago

Yes it works thanks for your help