hasitem
without location will ignore slot.weapon.mainhand
.
Steps to Reproduce:
1. Summon entities (e.g. zombie, armor_stand, villager, etc.)
2. Run /replaceitem entity @e slot.weapon.mainhand 0 cake
3. Run /testfor @e[hasitem={item=cake}]
4. Run /testfor @e[hasitem={item=cake,location=slot.weapon.mainhand}]
Results:
3. The entities summoned in step 1 was not included, only the player was output. Other entities should be included. It is considered that the slot.hotbar of the player is referenced.
4. It works as expected. Make sure mainhand contains an item.
Linked issues
duplicates 1
Comments 3
Thank you for your report!
We're tracking this issue in MCPE-151920, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
No, no, data argument
does NOT matter. This is not MCPE-151920.
I used a translator, so I'm sorry if there are bad sentences.