6

I was messing with command blocks today and I tried to put colored carpet on my head. I don't really know that much about command blocks and that kind of stuff. I already know /replaceitem entity @p slot.armor.head minecraft:carpet 1 0, but I want to know the command for colored carpet.

1 Answer 1

4

The replaceitem syntax for entities is:

/replaceitem entity <selector> <slot> <item> [amount] [data] [dataTag]

The carpet's colour is represented by its data value (sometimes called "damage value"). Currently you have it set to 0, which is white. You can see these values here.

For example, for lime carpet:

/replaceitem entity @p slot.armor.head minecraft:carpet 1 5
1
  • Thanks SirBenet- I haven't been on this website in a while, and I realized that you answered my old question already. I figured the answer out months later.. I'm an idiot.
    – rager
    Commented Aug 7, 2017 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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