GUI Issues

Upvotes: 1
Issue description

So just today I was updating my MCreator version being very happy that the Metadata bug was fixed, so my duplicator mod worked better. But, I ran into another problem. I tried to test how it worked in the test environment. I was glad to see that my item duplicator had worked, until I tried to pick up the duplicated item after I took out the non-duplicated item. It just... disappeared. I tried this multiple times but it happened over and over again. I'm really sorry if this is my coding error, but I don't think it is. I also tried replicating the mod with the same code, and that didn't work either.

Attachment Size
Procedure96.08 KB 96.08 KB

Issue comments

Submitted by Klemen on Fri, 04/19/2019 - 14:24

Please give me details on how to replicate this issue in-game as I am now aware on how your mod works.

  1. Take one of the item duplicators.
  2. put a duplicator stick in the bottom slot.
  3. put any item/block in the left side slot.
  4. Click duplicate.

Submitted by Klemen on Tue, 04/23/2019 - 12:21

The issue is that you pass the item from the slot directly to another slot. The same itemstack is used and as you pick it from one slot, you can't do the same for another slot because this itemstack was already taken out. A proper itemstack copy needs to be made.

This is, in fact, a bug in MCreator. To fix this, I will add the following procedure block in MCreator 1.8.4:


There is no workaround unfortunately so you will have to wait for next update to use this procedure block that will make a copy of itemstack and not just place the same instance in another slot.

Ok. Thanks for helping me with this problem!

I'm going to remove the mcr file. I can always put it up if a moderator needs it.

Submitted by Klemen on Sat, 06/22/2019 - 10:15

In fact you won't need to explicitly use make a copy of itemstack in MCreator for this to work. Just import your workspace in MCreator 1.9.0 will fix this issue. I will still keep this procedure block for the future features reasons.