mojira.dev
MC-83992

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:[{Slot:99b,id:"minecraft:pumpkin"}]}
output: [nick] did not match required data structure

Linked issues

Attachments

Comments 5

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

  • 15w36c please change the title to "replaceitem refers to wrong slot numbers for mainhand and offhand"

That'd make this a totally diffrent issue, create a new report for that

off hand slot = -106

crafting grit simply cannot be targeted, and has been this way for a long time

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

Irbis

(Unassigned)

Unconfirmed

Minecraft 15w31b, Minecraft 15w36c, Minecraft 15w42a

Retrieved