Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Some items with empty attribute list receive additional data after interacting with them in the inventory

Open Toseflo opened this issue 9 months ago • 5 comments

Expected behavior

Moving an item in an inventory shouldn't change the item data

Observed/Actual behavior

Moving a shield with attribute_modifiers:{show_in_tooltip: 0b, modifiers:[]} adds banner_patterns:[] to the item components

Steps/models to reproduce

As requested in this bug report (https://github.com/PaperMC/Paper/issues/10686), here is the new bug report for the shield issue.

  1. Give yourself a custom shield with /give @p minecraft:shield[minecraft:attribute_modifiers={show_in_tooltip:0b,modifiers:[]}]
  2. Use /data get entity @s SelectedItem to confirm that the shield just has this component
  3. Pick this item up with your cursor and place it in the inventory again
  4. Use /data get entity @s SelectedItem again and notice how the shield now also has the component banner_patterns:[]

Plugin and Datapack List

No plugins or data packs

Paper version

This server is running Paper version git-Paper-64 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 6c02dbc) You are running the latest version Previous version: git-Paper-62 (MC: 1.20.6)

Other

An (incomplete) list of other affected items: shulker_box, chest: receive empty container:[] component potion: receives empty potion_contents:{} component bee_nest, beehive: receive block_entity_data:{id:beehive,Bukkit.MaxEntities:3},bees:[] decorated_pot: receives pot_decorations:[brick,brick,brick,brick],container:[]

Toseflo avatar May 11 '24 19:05 Toseflo