Procedures to manage slots of inventory of the entity

Upvotes: 4
Issue description

Hello,

My question is described by the title.

I want to be able to set the slots of a custom gui to the items in your hotbar. As far as I know, the only way you can do this, is by selecting each hotbar slot, and assigning the item in each one to a gui slot with the get item in main-hand of target entity block. The problem is I can't change the selected hotbar slot from the procedure.

I didn't find anything about this on the wiki.

Could this maybe be added in later versions?

Issue comments

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.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.