-
Bug
-
Resolution: Duplicate
-
None
-
1.21.20
-
None
-
Unconfirmed
-
Windows
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.
- duplicates
-
MCPE-151920 The command does not evaluate the selector argument "hasitem" -> data.
- Reopened