GUI Problem with on item taken from slot

Upvotes: 2
Issue description

Well, I recently updated my MCreator to 1.9.1, and I was excited to see the new GUI slot procedure system, but when I tested it, I found some difficulties:

- How to create crafting GUI without a button (like crafting table)?

At first I thought that it would be easy, so I created a block with update tick and right click events, just as normal.

After that, I made the procedure system that consisted in:

if (slot 1 == ITEM) and (slot 2 == ANOTHER_ITEM) then (set slot 3 == CREATED_ITEM)

else (remove CREATED ITEM)

As expected the procedure worked well, but when I went to the GUI editor to see the new procedure system for slots, i found a issue when using the when item taken form slot event.

PS: In my mind, my procedures system makes sense once it's simple: Item taken from slot -> remove items form slot 0 and 1

And now the issue happens, when I finish crafting, the initial items stay on slot 0 and 1, and when I take one of the items out or close and open the GUI, the items disapear. This isa very  esthetic issue, but is annoying, I don't really know that this is an issue or I did something wrong :(

Thank you a lot, I love what the MCreator team are making, you're doing a perfect job, I love it. I'm excited about MCreator PRO :)

Attachment Size
Issue 11.46 MB 1.46 MB
Issue 2950.32 KB 950.32 KB
My test Workspace21.92 KB 21.92 KB

Issue comments

Could you attach your workspace and tell me how to reproduce the issue?

I can reproduce this bug. I will try to fix it.

For now one workaround would be to extend your on tick update procedure to set a NBT variable say isOutputReady to true after you place item in result slot. Then check in next tick if the resulting slot is empty and isOutputReady true and in this case, empty the input slots too and set isOutputReady back to false.

It worked fine, but I had to delete the When item taken from slot  and When transfered from slot events, so, i would be great if the slot event updates the GUI every time to check the conditions, an then I could use this feature and would be more simple and organized.

Is that a unexpected issue?

Thanks a lot Klemen, and congratulations for the patch!!

Yes, it is unexpected, I will try to fix this in 1.9.2.

You are welcome!



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.