-1

I am currently making a remake of the Cobalt Shield in Minecraft 1.14.3, but I do not know how to change the custom item name's formatting in-game.

Can someone help me figure out how to color the item name and make font adjustments to it, i.e. make it non-italicized?

I tried to use this command:

/give @s minecraft:shield
{
  BlockEntityTag:
  {
    Base:11,
    Patterns:
    [
      {
        Color:9,
        Pattern:"vhr"
      },
      {
        Color:15,
        Pattern:"cs"
      },
      {
        Color:15,
        Pattern:"ms"
      },
      {
        Color:4,
        Pattern:"sc"
      },
      {
        Color:15,
        Pattern:"gru"
      }
    ]
  },
  AttributeModifiers:
  [
    {
      AttributeName:"generic.knockbackResistance",
      Name:"Block",
      Slot:"offhand",
      Amount:100,
      Operation:0,
      UUIDMost:71140,
      UUIDLeast:113080
    }
  ],
  Unbreakable:1b,
  display:
  {
    Name:"{\"text\":\"Cobalt Shield\"}"
  }
}
  • 1
    I don't really understand what you're asking, but at least could you include what version of Minecraft you're using? – DJ Spicy Deluxe Jul 7 at 2:51
  • 1
    He wants to know how to color the name "Cobalt Shield", in the display tag of the command. He also wants to know how to make the name non-italicized. – Nik3141 Jul 7 at 18:21
  • 1
    @Kaleb Unfortunately, I cannot answer it because it has been put on hold, but your display tag should look like this: display:{Name:"{\"text\":\"Cobalt Shield\",\"color\":\"dark_aqua\",\"italic\":\"false\"}". – Nik3141 Jul 7 at 18:25
  • Additionally, this question has more information plus a link you can peruse. – Joachim Jul 7 at 20:21
0

Your display tag should look like this:

  display:{Name:"{\"text\":\"Cobalt Shield\",\"color\":\"dark_aqua\",\"italic\":\"false\"}"

Because you are modifying the color and font style of the name, it goes in the Name tag. What you are doing, essentially, is this: {"text":"Cobalt Shield","color":"dark_aqua","italic":"false"}, but because this is a String (series of characters) containing JSON being passed into Minecraft you need to enclose the whole thing in quotes and you need to escape the quotes containing the JSON pairs, meaning put a backslash \ before each of them, which is why it looks so complicated.

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.