CraftTweaker / ContentTweaker

Custom Minecraft Objects created from MT scripts
MIT License
42 stars 17 forks source link

[1.18.2] missing documentation. display name for created items. #272

Open ptk2003 opened 1 year ago

ptk2003 commented 1 year ago

examples generate files where all items have name "Custom Item" CF page have wrong link: https://crafttweaker.readthedocs.io/en/latest/#Mods/ContentTweaker/ContentTweaker/ (The page you were trying to reach could not be found!)

from example: <factory:item> .typed<Basic>() .tab(examplesTab) .rarity(<constant:minecraft:item/rarity:uncommon>) .build("very_basic_item"); so, how change name form "Custom Item"?

Mikaaah commented 1 year ago

You'll need to add a lang file via a resourcepack. Folder structure for the Lang file would be as followed,

assets - contenttweaker - lang - en_us.json Then within that file to name for instance very_basic_item, you would use

"item.contenttweaker.very_basic_item": "This is now named" As for a block you would use "block.contenttweaker.custom_block": instead of item and for creative tabs it would be "ItemGroup.examplesTab":