mojira.dev
MC-312798

"/item replace with" suggests multislot arguments like "hotbar.*" despite treating them the same as "hotbar.0"

“/item replace entity @s hotbar.* with dirt” will replace only the first hotbar slot with dirt, I expected it to replace the whole hotbar.

“/item override” has a very similar behavior where it treats the item_stack as a single slot, and clears the remaining slots.

To Confirm:

  1. enter command /item replace entity @s hotbar.* with dirt

  2. notice that it only effected the first slot

My issue is not necessarily about functionality, but being mislead by suggested arguments.

Comments 1

This is intended. You can use /item fill to get your expected behavior
The command suggests hotbar.* for the source because /item replace is capable of filling multiple slots when it finds multiple source items. If you use from, you can pull multiple source items from a block or entity. with only produces one item, so the semantics for /item replace are for it to only fill the first slot.

catiosis

(Unassigned)

Unconfirmed

26.4 Snapshot 5

Retrieved