Spawning Gem Procedure not working

Issue description

I made a procedure that would spawn a gem of whatever item was in slot 2, and then clear that slot once that item was spawned.

In 1.9.0 it worked perfectly with no issues.

Now in 1.9.1, we can see the item spawn but then it instantly despawn.

I'm not sure if this is somehow user error, or if it's just a weird bug with the "spawn gem" procedure.

Issue comments

Which trigger do you use to trigger these procedures? And could you attach your procedures or screenshots of them?

I have a general procedure to open a GUI when the block is right clicked, and then I have a button on the GUI to run the procedure that's spawning the gem.

(GUI)GUI

(Procedure for the Observe Button) :

Procedure

Sorry for such the late reply!

In spawn gem procedure, wrap the get item in the slot with Make a copy of itemstack from Item procedures.

Right now, itemstack reference is passed and once removed from the slot, it is removed from existence. By making a copy, removing the item in slot won't remove it from spawned gem too.

Caused by this ticket: https://mcreator.net/tracker/issue/50841