Inventories and slot GUIs for entities

Upvotes: 12
Issue description

The workspace is all set up and only uses the elements for the trading mechanics.

The procedure does work however when you go to take the golden carrots out of the output slot it rolls them back to the items in the input slot.

This can be avoided however if you shift-click the golden carrots in the output slot which will add it to the player's inventory.

If at that point you click on the golden carrots while the inventory is still open it will also roll it back to the regular carrots in slot 0.

If you close the GUI you then have made a proper trade.

I am not sure if it's just the way the procedure is set up or if in fact its a bug, however if it works properly still I would think that it may be a bug with GUI slots.

something to look into, hope this helps, and I am looking forward to making a tutorial for this system in the future ;)

PS:
The villager skin is from 1.14 it looks so odd in 1.12 I did not think that it would look like he's wearing shorts, it's kinda funny. A villager on vacation, bring tourism to Minecraft.

Attachment Size
This is the 1.9.0 workspace zip for the issue.19.92 KB 19.92 KB

Issue comments

Developer Submitted by Klemen on Mon, 07/22/2019 - 09:14

This is because this GUI is not bound to any stored inventory. Currently, only GUIs bound to blocks will work 100% properly.

I will change this to a feature request to support GUI binding to entities.