mojira.dev
MC-225610

Blocks with NBT that are picked up by an Enderman don't get saved

The Bug:

Blocks such as Shulker Boxes, Command Blocks, Structure Blocks, Spawners, etc. that are picked up by an enderman don't have their NBT saved.

 

To Reproduce:

  1. Make a datapack and add "minecraft:shulker_box" to the #enderman_holdable tag

  2. Do /give @p shulker_box{BlockEntityTag:{Items:[{Slot:0,id:stone,Count:64}]}} 1

  3. Place a bunch of them around

  4. Summon many enderman and wait for one to hold a shulker box

  5. Wait for an enderman to place down the shulker box

Results:

**When you open the shulker box, the items inside the shulker box will disappear.

Comments 4

I think that NBT data isn't saved because endermen were never meant to hold shulker boxes. But it would be nice if Mojang patched this though. ¯_(ツ)_/¯ so yeah

The block state NBT is a commonly used across entities (endermen, falling blocks, arrows, moving pistons). It would be great if it included a block entity object (excluding x y and z), so that all these places are consistent in saving that data. Currently only falling blocks can save the block entity (under the object TileEntityTag), but saving it for all would not only fix this, but also be a good step for movable block entities.

If this saves nbt of a command block, there is a threat that could be exploited

Can this be reproduced in 1.20.5?

InfinitySwordofDiamond

(Unassigned)

Confirmed

Mob behaviour

1.16.5, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 2, ..., 25w31a, 25w32a, 25w33a, 25w34b, 25w35a

Retrieved