A shield with a food component cannot be eaten. Instead the shield is used as normal.
Purposely overwriting the shield block behavior with a food component should work in my opinion.
/give @s minecraft:shield[minecraft:food={nutrition:1, saturation_modifier:1}]
Attachments
Comments 3
The component permits consumption only when there are no alternative right-click actions available. It doesn't override any existing right-click functionalities.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm. Relates to MC-269629 MC-269648 MC-269631 MC-269638 MC-269640 MC-269655 MC-269658 MC-269694 MC-269722