-
Bug
-
Resolution: Unresolved
-
None
-
20w13b, 1.16.2 Pre-release 2, 1.16.2 Release Candidate 1, 1.16.2
-
None
-
Confirmed
-
Commands
-
Low
-
Platform
To reproduce:
- Put a shulker box (which only has slots 0..26) down and stand on it.
- Put any item or stack into your 27th slot, the bottom left of the regular inventory.
- Run this command:
/data modify block ~ ~-1 ~ Items[0] set from entity @s Inventory[{Slot:27b}]
Result: Nothing changes in the shulker box and this error message appears in chat:
Nothing changed. The specified properties already have these values
Explanation: Copying the NBT from slot 27 also copies the slot number, which causes the slot to get deleted, but there is no error message or warning for that. Instead the validation mechanism seems to compare the non-existent slot how it is now to how it was before, which is of course the same. Therefore it ends up lying that it was the same as the NBT that was copied.
A proper fix for this would be to add a warning when a slot number gets set to something that causes the slot to get deleted (which can be triggered in more cases, for example when setting that number directly) and to skip the error message "nothing changed" (making the command's success value 1). The actual behaviour of deleting the stack (effectively not copying it in this case) seems intended to me.
- relates to
-
MC-146179 /data modify: appending or prepending list to another list fails with error message "The specified properties already have these values"
- Resolved