mojira.dev
MC-271495

Blocks with components doesn't keep them when broken

Explainations :

When i place a block with components (item_name, max_stack_size, ...) and i mine them, they don't keep their components.

How to reproduce :

  1. Give you a block or place it with setblock
    Exemple : /give @s minecraft:furnace[minecraft:item_name=' {"text":"Super duper furnace"}']

  1. Check block's components with /data get block X Y Z components
    Output : Le bloc aux coordonnées 2, 93, 15 a les données de bloc suivantes : {"minecraft:item_name": '"Super duper furnace"'}

  2. Place it ! (by hand or with dispenser for shulkerboxes)

  3. Break it ! ⛏

  4. Check item's components with /data get entity @s SelectedItem
    Output : wolphwood a les données d'entité suivantes : {count: 1, id: "minecraft:furnace"}

 

I can understand why normal blocks don't save components (but in the to "standardize", it would be cool if they did.) once they've been placed.
But tile entities already have components, so they should.

Attachments

Comments 1

From the 24w13a changelog:

Non-default components on item stacks containing block items are now stored on block entities when placed

  • Does not automatically cause preserved components to be restored on drops - this requires addition of copy_components function to loot table

Wolphwood

(Unassigned)

Unconfirmed

(Unassigned)

1.20.6

Retrieved