If I try to change the Inventory of a barrel,chest,Shulkerbox with /replaceitem, then inventory.0 is in the second line
Linked issues
Attachments
Comments 4
All these slot descriptions are apparently mapping to internal slot IDs, which are not exclusive for one type, see also MC-138674.
Though I agree that it would be very helpful if the command prevented you from using a wrong slot type, however this is not what this report is about.
I think a separate report should be created for this.
I created MC-143716 for that now, please comment on it if you want to become the reporter.
You have to use
container.X
as slot for containers.