Topic category: Help with Minecraft modding (Java Edition)
I have a mob, that when right clicked, opens up a GUI for you to put in 64 objects in an item box and push a button, the idea is that after you push a button, the entity becomes tamed to the player who did the trade.
There's a procedure to display the gui:
And then there's another one that checks whether the trade is correct or not when you push the button, but Event/target entity now seems to affect ALL instances of the mob on the map, not just the one I right clicked on. On top of that, source entity just leads to a build failed as soon as I run it.
It seems once I reach the GUI trade confirmation part, target entity (the specific mob) and source entity (the player) are completely forgotten by the mod, how do I carry these to the procedure that checks the trade and confirms it? This is my first mod in MCreator by the way so I'm not too experienced.
How are these procedures triggered?
The first one is triggered through right clicking the entity, the second one triggers when you press the GUI's only button.
yeah so as you can see here, that trigger doesn't provide the source entity dependency.
You could use the global variable uuids you are saving to get it though, it requires a custom code snippet,
https://files.catbox.moe/7l8eu9.ptpl
oh and these should probably be swapped,