While testing 2020.4.28114 snapshot, I can't seem to find a way to count the items of a specific inventory slot of an entity when the GUI is closed. I found the procedure blocks for the "currently open GUI", like below...
...but I can't figure out a way to get the number from the inventory slot without an open GUI. I don't know if we should have a new procedure block like the one below?
With that it would be possible to decrement the number of items in the specific slot by the following approach:
I'm sorry if I'm just being blind and can't find the right procedure block... Maybe there's another solution too.
Use stack size procedure block to get stack size of copy of item from slot of entity and remove 1 using subtract block.
This is "How to" question and belongs on forums, check the tracker rules. Thanks!