mojira.dev
MC-270006

Can't give item with item_name component set to "null"

When trying to give yourself an item with the item_name component set to "null" you instead get an error

Malformed 'minecraft:item_name' component: 'Not a JSON object: null; Not a json array: null; Not a string: null'

Command:

/give @p minecraft:breeze_rod[minecraft:item_name="null"]

Linked issues

Attachments

Comments 5

Can confirm, though this can be circumvented by altering the command:

/give @p stick[minecraft:item_name='{"text":"null"}']

Also affects the custom_name component.

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

This report does not describe a bug.

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

The error message is correct - "null" is not a correct stringified component. "'null'" or "\"null\"" would be.

I see, thanks for explaining

mattp12

(Unassigned)

Confirmed

(Unassigned)

24w13a

Retrieved