Topic category: Help with Minecraft modding (Java Edition)
I'm trying to transfer all the inventory of a player to a block, spawned on the place were he dies (on MCreator 2023.1 for forge 1.18.2).
I was able to make the block spawn but i'm having issues with the inventory transfer.
Here the screenshot of the procedure:
The x, y and z are local variables where I've put the actual coordinates of the player when he died, and block_slot begins from 0 and is the slot of the bock GUI.
I really don't understand what I'm doing wrong...the exp bottle part works but the for each with the itemstack iterator no.
UPDATE:
I think it's a problem of the event/target entity (this procedure uses the global trigger "when entity dies") because I tried to apply that "code" to the block right clicked trigger and it works. Any ideas how to solve it?
Try to use Entity Iterator instead of Event/Target Entity and check if the Entity Iterator is the Event/Target Entity inside the For each Slot Block.
Maybe this fixes it.
Hey, I'm terribly late to this reply, but have you checked if it works if you set your slot selector with the [local number variable +1] inside a "repeat n times" (where n would be the max number of slots to check) block/loop?
I'm triyng this for a similar use case right now.