#Changing color of effect DisplayName

6 messages · Page 1 of 1 (latest)

mild finch
#

i copied this script from example radiation effect but it doesn't change the color of the name, i assume that it's what it does

StartupEvents.registry('mob_effect', e => {

    // Register fortune effect
    e.create('fortune')
        .displayName(Component.aqua("Fortune"))
        // Set a tick event to apply the action
        .effectTick((entity, lvl) => { if(entity.level.clientSide) return })
        .color(Color.AQUA)
        .beneficial();

        e.create('silk_touch')
        .displayName(Component.gold("Silk Touch"))
        // Set a tick event to apply the action
        .effectTick((entity, lvl) => { if(entity.level.clientSide) return })
        .color(Color.GOLD)
        .beneficial();
})```
Nothing in logs, just doesn't work. It has a white color when you look for effect in player inventory
winged vesselBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

jagged egret
#

the right way to do is create a Rarity and pass it to .rarity()

a hacking way to do is use color code instead of using Component

#

choose your poison

mild finch
#

broh... why the example have it than, lol.

#

thanks anyway. color code it is