-1

I have this command and I'm wondering how to add a coloured name to it (light green, specifically)

/give @p minecraft:player_head{display:{Name:"{\"text\":\"Common Chicken Head\"}"},Enchantments:[{id:"minecraft:feather_falling",lvl:1}],SkullOwner:"MHF_Chicken",AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:0.1f,Operation:0,UUIDMost:21470,UUIDLeast:179416}]} 1

Thank you!

0

You already have most of it, you just need to add a "color":"green" to the JSON component for Name that you've already got:

Name:"{\"color\":\"green\",\"text\":\"Common Chicken Head\"}"

You might also like to remove the italic font that is given to named items automatically by using "italic":"false"

Name:"{\"color\":\"green\",\"text\":\"Common Chicken Head\",\"italic\":\"false\"}"

Edit: Based on the fact it's specifically a head, you should probably also limit the health boost to when it's on your head. This is done using Slot:"head"

{Slot:"head",AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:0.1f,Operation:0,UUIDMost:21470,UUIDLeast:179416}

So the full command is:

/give @p minecraft:player_head{display:{Name:"{\"color\":\"green\",\"text\":\"Common Chicken Head\",\"italic\":\"false\"}"},Enchantments:[{id:"minecraft:feather_falling",lvl:1}],SkullOwner:"MHF_Chicken",AttributeModifiers:[{Slot:"head",AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:0.1f,Operation:0,UUIDMost:21470,UUIDLeast:179416}]} 1
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.