mojira.dev
MC-298484

Shulker boxes loose certain NBT components when not directly broken by players

Description:

While the shulker box keeps NBT components when broken directly by the player (mined), some components like damage_resistant or custom_model_data are lost, when the shulkerbox is broken by tnt or pistons. Interestingly, other components like lock do not seem to be affected by this.

Steps to reproduce:

  1. run following command to aquire shulkerbox:

    /give @p shulker_box[damage_resistant={types:"#minecraft:is_fire"}] 1
  2. place shulkerbox down, and let a piston or tnt break shulkerbox

  3. inspect dropped shulkerbox item eg. using command:

    /data get entity @e[type=item,limit=1]
  4. notice damage_resistant component of new item is missing

  5. (Optional) repeat steps 1-4 but break the shulkerbox by mining it instead and notice damage_resistant component of new Item is still present

Expected behavior:

shulker box keeps all NBT components when broken by pistons, tnt or player

Actual behavior:

shulker box looses some NBT components when broken by pistons or tnt, while keeping them when mined by a player

Linked issues

Comments 1

This issue is already being tracked in MC-270180.

Bernhard Blietz

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5, 1.21.6 Pre-Release 1

Retrieved