mojira.dev
MC-269068

Inconsistent display of 'default' components

It seems that ALL items currently have at least 4 components:

  • lore

  • enchantments

  • attribute_modifiers

  • repair_cost

These have the default values: [], {levels:{}}, {modifiers:[]}, 0

On the other hand:

components like

  • custom_name

  • can_break

  • can_place_on

  • custom_data

  • ...

Do not have any 'defaults'

so they simply are not always on each item.

 

However, trying to set the value for these to a reasonable default, makes for unusual behavior.

Trying to remove ( using `!<component>: {}` syntax in an item modifier) these components will result in 'success' without actually modifying the item or removing the component.

Further. The top 4 components show up on every item in the tooltip '4 component(s)'. But using '/data get ...', the `components:` data contains 0 such elements.

This is quite misleading.

 

Reproduction steps:

Grab any regular item like a stick (f3+h to enable tooltips)

4 Components are displayed as a . minimum

Now use /data get @s SelectedItem.

Observe how no components show up (bc they're default)

 

Consistency

It would be reasonable to either hide the `X component(s)` on items when the value is default.

Then, for any REMOVED components (e.g. removing damage from a sword) it should have a tooltip `X removed component(s)`

 

For the `/data get` command, the result should display the default values.

Attachments

Comments 3

Please attach steps to help reproduce this issue

I don't think you need any steps tbf. You just need to observe the item tooltip and associated data with commands.

I added them regardless.

 

Thank you for your report!
After consideration, the issue is being closed as Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

AgentM

(Unassigned)

Confirmed

(Unassigned)

24w09a

Retrieved