Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-165334

Hasitem target selector cannot use exclamation symbol "!" Which is used for invert the selection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.51, 1.20.41 Hotfix
    • None
    • Confirmed
    • Multiple
    • 948341

      Steps to Reproduce :
      1. If you use command block and set the mode to repeat and always active and insert the command, for example

      testfor @p[hasitem=!{location=slot.hotbar,slot=0, item=log}]
      

      more explanation on observed result no.1

      2.and the hasitem target selector "item" too cannot detect an "air" item which mean when player is not holding any item. For example

      testfor @p[hasitem={location=slot.weapon.mainhand,item=air}]
      

      more explanation on observed results no.2

      Observed Results :
      1.The command block cannot execute when in the hotbar slot 0 is not log item. And in the command output is written "no matches target selector" even when im already fullfil the criteria
      2.and when you used an "air" item in the hasitem "item" the command is cannot execute, and in the command output is written "no matches target selector" even when im already fullfil the criteria
      Expected Results :
      1.the command should execute when the target /players is don't have log item in the specific hotbar that written in the command block, and the command output should written "found (entity name) (amount of entity)"
      2.the command should execute when the target /players is not holding any item, because if you using replaceitem and using "air" item, item that I hold is replace by "air", or make me not holding any item.

            Reveth Reveth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: