mojira.dev
MC-257843

note_block_sound data is lost when breaking a player head

When you break a player head with the tag note_block_sound set, which makes the note block placed below produce the specified sound as expected, the resulting item doesn't have the tag.

To reproduce

  1. Stand on top of a note block

  2. Run the command

    /setblock ~ ~ ~ player_head{note_block_sound:"minecraft:ambient.cave"}
  3. Right-click the note block, this will cause a spooky sound to play

  4. Switch into Survival mode

  5. Break the head

  6. Select it in your hotbar

  7. Run

    /data get entity @s SelectedItem
  8. Place it back on top of the note block

  9. Right-click the note block again

Observed result

No sound is played and the result of the command is

{id: "minecraft:player_head", Count: 1b}

Expected result

A spooky sound is played and the result of the command is

{id: "minecraft:player_head", Count: 1b, tag: {BlockEntityData: {note_block_sound: "minecraft:ambient.cave"}}}

Comments 2

When you place a player head item with the tag note_block_sound set, the resulting block doesn't have the tag and thus doesn't make the note block placed below produce the specified sound.

I couldn't reproduce that part. This command works fine:

/give @s minecraft:player_head{BlockEntityTag:{note_block_sound:"minecraft:ambient.cave"}}

Indeed, I was giving myself a head with a raw note_block_sound tag instead of including it in a BlockEntityTag tag. Thanks for the correction.

AHL

slicedlime

Confirmed

Platform

Normal

Block states, Commands

1.19.3 Pre-release 2

1.19.3 Pre-release 3

Retrieved