Mojira Archive
MCPE-185312

hasitem ignores mainhand

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.

Duplicate

szea_ll14

2024-08-14, 12:22 PM

2024-08-16, 04:20 AM

2024-08-14, 07:21 PM

0

1

Unconfirmed

1.21.20

-