Items not visually deleting when clear command used via function
I'm trying to find a basic way to make a gui with a datapack, and decided to try and find a way to run commands using advancements for getting an item with an nbt tag to trigger a function.
As a test, I made it a red carpet with nbt tag {test: 1b}, and everything is working as intended, except that when the clear command runs, the clear command (which is set to only remove the nbt tagged carpet) removes the item but the client does not visually update until opening a GUI of some kind, for example a chest.
Does anyone know a way to force the inventory to update automatically?
Continue to help post