Title is quite self explanatory. The "hasitem" selector– a component that is used for commands to test whether or not an entity has a specific item– no longer works, unless you strictly specify the location component of the item. It wasn't like this before; it's always been the case that when you didn't specify the location, your hasitem command would default to any valid slot in the entity's inventory; thus when you looked for the held item of an entity, the command used to be able to detect it regardless of whether or not you specified the location. This has always worked just fine before, and thus i believe that a recent update may have caused this bug to occur. The command also seems to work just fine when used on a player (as seen on the video below), but not on any other entity. I used to have many systems that utilized this neat little trick, but now they're all completely broken thanks to this.
The steps to reproduce this issue are shown in the clip below.
Linked issues
is duplicated by 1
Attachments
Comments 2
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
I add that this bug occure only when the item’is in the mainhand