mojira.dev
MC-313283

/item modify now succeeds on empty slots

Running /item modify on an empty entity slot or empty container slots now succeeds and counts every empty slot as modified instead of skipping empty slots or failing with target has no item in the slot. This is a regression introduced in 26.4 snapshot 9.


Steps to reproduce

  • Make sure your main hand is empty.

  • Run: /item modify entity @s weapon.mainhand {type:"minecraft:set_name",name:"Test"}

  • Place an empty chest and run: /item modify block ~ ~ ~ container.* {type:"minecraft:set_name",name:"Test"}

  • Run a damage modifier on the empty chest and check the game log: /item modify block ~ ~ ~ container.* {type:"minecraft:set_damage",damage:0.5}


Observed result:
The command succeeds on empty slots, reporting modified 1 item on an empty hand and modified 27 items on an empty chest, while executing the item modifier directly on ItemStack.EMPTY (which spams the game log with `couldn't set damage of loot item 0 air`).

Expected result:
/item modify should ignore empty slots.

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version History – Snapshot Version History – The official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

BugTracker - BugTX

(Unassigned)

Confirmed

26.4 Snapshot 10

Retrieved