Topic category: Help with MCreator modding
I'm trying to take a block with an associated GUI and change the model when a certain number of items are stored within the block's inventory.
Because there is no non-code way to change establish, define and change blockstates, I change models by creating new custom blocks and using a procedure to remove Block A and place Block B. This works fine.
The problem I'm having is with the GUI association feature. If I disassociate the GUI called when I right click Block A, the same GUI called in the same way from Block B doesn't inherit the inventory from Block A anymore and the GUI doesn't work properly. If I want to keep the GUI specific to Blocks A and B, do I have to create a new, identical GUI for each new block/model and then build into the block replacement procedure a function to carry over the inventory? Creating one GUI to be accessed universally from every Block A or Block B in the world is off the table.
Can anyone think of an easier/better way to do this?
If not, and if I do try to carry over the inventory from Block A to Block B, how should I do this? Using an int variable to move the number of items is easy, but what about carrying over an itemstack? Can I convert itemstack to a string variable in the procedure block editor somehow?