Hello Everyone. Im trying to get the apotheosis:rarity="apotheosis:mythic" disblayed int eh 2nd line of my tooltip and that the code i came up with but its not showing. `// kubejs/client_scripts/apotheosis_rarity_tooltip.js
ItemEvents.modifyTooltips(e => {
e.modifyAll(b => {
let item = b.item;
// Überprüfen, ob das Item und seine Komponenten vorhanden sind
if (!item || !item.components) return;
// Holen der Raritätskomponente direkt
let rarityComp = item.components.get('apotheosis:rarity');
if (rarityComp) {
// Wenn rarityComp ein Objekt oder String ist, konvertiere es zur ID
let rarityKey = rarityComp.toString();
let rarityMap = {
'apotheosis:common': 'Common',
'apotheosis:uncommon': 'Uncommon',
'apotheosis:rare': 'Rare',
'apotheosis:epic': 'Epic',
'apotheosis:legendary': 'Legendary',
'apotheosis:mythic': 'Mythic',
'apotheosis:ancient': 'Ancient'
};
let rarityDisplay = rarityMap[rarityKey];
if (rarityDisplay) {
// Fügt die Zeile an Position 1 (unter dem Namen) ein
b.insert(1, Text.of('Rarity: ' + rarityDisplay).gold());
}
}
});
});`