mojira.dev
MCPE-155406

hasitem target selector argument does not detect specific data values on items with durability.

Whenever using the hasitem argument to filter out durability items with specific data values (which translates to durability for the item) it fails to detect any players with those items.

How to reproduce:

/give @s leather_helmet 1 2

/give @a[hasitem=
{data=2,item=leather_helmet}] diamondΒ 

Expected result:

Gain one diamond

Actual result:

Failed to detect any player

Β 

It is worthy to mention that if you use a data value of 0 or lower, then the command does work properly. However, this still doesn't work with other data values. It is also worthy to mention that this issue persists with all items that have durability, not just leather helmets.

Linked issues

Comments 1

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
πŸ““ 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.

zeeb

(Unassigned)

Unconfirmed

Multiple

all

1.18.31

Retrieved