Can't get number of items in entity inventory slot without an open GUI

Published by damiansb on
Status
Resolved
Issue description

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...

Open gui

...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?

 

Get number

 

With that it would be possible to decrement the number of items in the specific slot by the following approach:

Procedure

I'm sorry if I'm just being blind and can't find the right procedure block... Maybe there's another solution too.

Issue comments

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!