Minecraft Java Edition – How to Use /setblock in 1.12 to Make a Blue Banner

minecraft-commandsminecraft-java-edition

I would like to be able to use /setblock to make a blue banner in Minecraft 1.12.

So far I have the following command in progress:

/setblock ~ ~ ~ minecraft:standing_banner 4

But I've tried adding 4, Damage:4, Base:4, etc to the end, but the banner is always black.

How do I make it blue?

I understand that in 1.13 and above, different banner backgrounds have different colours, for example, blue_banner. But in 1.12 this functionality has not been added yet. How can I achieve the same in 1.12?

Best Answer

This answer is for 1.12 and older versions.


Your attempt using Base:4 is the closest to the correct way. However, this is attempting to set a data value. This only sets the direction of the standing banner, not the background colour.

You need to move the Base:4 to the area where NBT tags are stored, in the {}s after the data value and old block handling.

/setblock ~ ~ ~ minecraft:standing_banner 0 replace {Base:0}

Here's a refresher of the possible values for the banner, for yours and the viewers' conveniences.

  • 0: Black
  • 1: Red
  • 2: Green
  • 3: Brown
  • 4: Blue
  • 5: Purple
  • 6: Cyan
  • 7: Light Gray
  • 8: Gray
  • 9: Pink
  • 10: Lime
  • 11: Yellow
  • 12: Light Blue
  • 13: Magenta
  • 14: Orange
  • 15: White