mojira.dev
MC-116165

If you place a bed with a command, except for a color data tag, a red bed is placed

If you place a bed with a command, except for a color data tag, a red bed is placed.

/setblock ~ ~ ~ bed default replace {color:1}

→ orange bed (work properly)

No NBT

/setblock ~ ~ ~ bed

→ red bed

No tags

/setblock ~ ~ ~ bed default replace {}

→ red bed

color tag without value

/setblock ~ ~ ~ bed default replace {color:}

→ white bed

Any other tag

/setblock ~ ~ ~ bed default replace {test:1}

→ red bed

Attachments

Comments 3

Judging by the compatibility for previous versions, I would say this works as intended.

Why would setting

{color:}

set a white bed but in ANY other case a red bed be intended?

Interestingly, some tags appear to get set to zero when defined as nothing, while others are set as the defaults. Examples:

Has pumpkin: /summon snowman ~ ~ ~ {CustomName:blah}
No pumpkin: /summon snowman ~ ~ ~ {CustomName:blah,Pumpkin:}

Normal health: /summon pig ~ ~ ~ {CustomName:blah}
Also normal health: /summon pig ~ ~ ~ {CustomName:blah,Health:}

This appears to be one of the former.

송민제

(Unassigned)

Confirmed

/fill, /setblock, bed, color, nbt

Minecraft 17w15a

Retrieved