CIT Resewn

CIT Resewn

14M Downloads

[Help Needed] Translatable names

Disketaa opened this issue · 7 comments

commented

Hi! Is there a way to set a localized string to an item name in CIT Resewn?

image
Something like this ^

commented

Does what you had not work? also, send logs just in case there might be an error.

commented

image

commented

Look at the item's nbt and make sure it uses a translatable component, just naming an it "Apple" in an anvil will only change the text to apple, it wont translate after

commented

image
image

commented

Interesting, does this work?

nbt.display.Name=[{"translate": "entity.minecraft.cat"}]
commented

Yeah, that is working! Thanks a lot! 🔥
But given item with "italic": false or "color": "red" params also should be matched in cit properties
Can it somehow be optimized with ** or regex to make it multi-color

image

commented

Closing as this appears to be resolved but definitely. You should be able to match with a regex and target the translatable component. Check the docs for how to match regex.