Custom name help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

LeeifMR

Member
Oct 2, 2024
27
1
3
I am trying to make it so if you mine a zombie head, it will instead drop you a zombie head with a custom name, but everytime the name is just "&#1C8A00Z&#1B8500o&#1A8000m&#197B00b&#187600i&#177100e &#166C00C&#146600o&#136100s&#125C00t&#115700u&#105200m&#0F4D00e" instead of how it's supposed to look (Image)
Code:
on break of zombie head:
    cancel event
    set event-block to air
    drop 1 zombie head named "&#1C8A00Z&#1B8500o&#1A8000m&#197B00b&#187600i&#177100e &#166C00C&#146600o&#136100s&#125C00t&#115700u&#105200m&#0F4D00e"
{4D828807-8D25-49BB-B9D3-F82E530D410E}.png
 
You need to get rid of the & symbol because its not a normal colour that is predefined, then you need to add <##> around the hexcode to make it work.

As zombie heads have two block states, when its mounted to the side of a block, or when it is placed on the ground, I have fixed the hex colour code and provided both for you.

This is for a zombie head placed on the ground, or air.
Code:
on break of zombie head:
    cancel event
    set event-block to air
    drop 1 zombie head named "<##1C8A00>Z<##1B8500>o<##1A8000>m<##197B00>b<##187600>i<##177100>e <##166C00>C<##146600>o<##136100>s<##125C00>t<##115700>u<##105200>m<##0F4D00>e"
This is for a zombie head that is 'mounted' to the side of a block.
Code:
on break of zombie_wall_head:
    cancel event
    set event-block to air
    drop 1 zombie head named "<##1C8A00>Z<##1B8500>o<##1A8000>m<##197B00>b<##187600>i<##177100>e <##166C00>C<##146600>o<##136100>s<##125C00>t<##115700>u<##105200>m<##0F4D00>e"

Hope this has helped :emoji_slight_smile: