Testfor command doesn't work for offhand slot (99), nor for crafting grid.
When i execute replaceitem for slot.weapon.offhand with pumpkin it tells me that slot 99 is replaced, but command testfor for slot 99 doesn't find item in it.
To reproduce:
/replaceitem entity @p slot.weapon.offhand minecraft:pumpkin
output: Replaced slot 99 with 1 * [Pumpkin]
/testfor @p {Inventory:[
]}
output: [nick] did not match required data structure
Linked Issues
Created Issue:
Testfor command doesn't work for offhand slot (99), nor for crafting grid.
When i execute replaceitem for slot.weapon.offhand with pumpkin it tells me that slot 99 is replaced, but command testfor for slot 99 doesn't find item in it.
{Slot:99b,id:"minecraft:pumpkin"}
To reproduce:
/replaceitem entity @p slot.weapon.offhand minecraft:pumpkin
output: Replaced slot 99 with 1 * [Pumpkin]
/testfor @p {Inventory:[]}
output: [nick] did not match required data structure
testing discovered
See MC-83992, the offhand slot number is -106b
So what you can do is:
/testfor @p {Inventory:[{id:"minecraft:stick",Slot:-106b}]}

I put 1 item in my off hand, rest of the inventory empty
off hand slot = -106
crafting grit simply cannot be targeted, and has been this way for a long time
Confirmed for
That'd make this a totally diffrent issue, create a new report for that
this is invalid
Agreed, invalid. Can one of you make sure a ticket for what Marcono1234 said exists? I'll do it later otherwise.
edit:
MC-90639