“/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:
enter command /item replace entity @s hotbar.* with dirt
notice that it only effected the first slot
My issue is not necessarily about functionality, but being mislead by suggested arguments.
This is intended. You can use
/item fillto get your expected behaviorThe command suggests
hotbar.*for the source because/item replaceis capable of filling multiple slots when it finds multiple source items. If you usefrom, you can pull multiple source items from a block or entity.withonly produces one item, so the semantics for/item replaceare for it to only fill the first slot.