mojira.dev
MC-136535

/item replace has container slots 27-53, but they are unusable

The bug

If you tried to replace item in large chest (2 blocks) in slot ID more than 26 (second part of the chest), it returns the error "The target does not have slot #SLOT#" .

How to reproduce

  • Place 2 chests in 0,0,0 and 0,0,1

  • execute /item replace block 0 0 0 container.42 with minecraft:diamond

  • The target does not have slot 42

 

Comments 8

I think you should be targeting the other chest

If you targets the other chest, you can replace the item but only with slot ID less than or equal to 26. But, at the moment, all slot IDs more than 26 are useless. So either you delete these IDs, or you fix this bug, but I think it would be useful if you fixed this bug. It could be useful to replace an item in the second part of a large chest with only one block coordinate.

Ah I see. I updated the title a bit to make this more clear

Confirmed for 1.13.2-pre1.

Confirmed for 1.13.2-pre2.

Affects 20w49a

/item block 0 0 0 container.42 replace minecraft:diamond

/replaceitem changed

Can confirm in 21w05b.

Affects 1.17

/item replace block 0 0 0 container.42 with minecraft:diamond

Mondemen

(Unassigned)

Confirmed

(Unassigned)

/replaceitem, chest, command, large-chest, slot

Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43b, ..., 1.15.2, 20w49a, 1.17, 1.20.4, 24w12a

Retrieved