mojira.dev
MCPE-152220

data values aren't supported fully by hasitem

Newly added hasitem target selector does't process data values in some conditions.

Using [hasitem={item=potion}] can only target water bottle, instead of targeting all potions. And commands like /me @s[hasitem={item=potion}] directly crash the game

How to reproduce 1:

  • hold a potion item (not a water bottle)

  • run command /testfor @s[hasitem={item=potion}]

  • you can't find yourself

Expected:

  • you can target yourself because you have a potion.

How to reproduce 2:

  • hold a potion item (not a water bottle)

  • run command /me [hasitem={item=potion}]

  • Game crashes

Expected:

  • you can target yourself because you have a potion.

block item's data values aren't supported, which means we can't target green wool, stone solely

Linked issues

Comments 6

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Isn't like /testfor @s[hasitem={item=potion, data=0, location=slot.weapon.mainhand}] ?

Isn't like /testfor @s[hasitem={item=potion, data=0, location=slot.weapon.mainhand}] ?

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.

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.

Former user

(Unassigned)

Unconfirmed

Multiple

1.18.20.23 Beta, 1.18.31

Retrieved