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
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.
I think you should be targeting the other chest