Question TranslatableComponent from item type in an item's lore

Slav ebb

New member
May 26, 2024
2
1
1
Helloo, i'd like to know how can i use a translatable component of an item type, in an item's lore (the title speaks for itself)

I've never used translatableComponents before so i dont really know what am i doing XD

TranslatableComponent text = new TranslatableComponent(is.getType().translationKey()); lore.add(ChatColor.WHITE+ text);
/.\ i thought this would of worked, but it does not at all
 

Slav ebb

New member
May 26, 2024
2
1
1
I FFFINALY figured it out
List<Component> lore = new ArrayList<Component>(); final Component message = Component.translatable(is.getType().translationKey()); lore.add(message);
 
  • Like
Reactions: mbaxter