Started by
PansyGum
on
Topic category: Help with modding (Java Edition)
Hey all. I'm pretty new to MCreator and having some trouble with this procedure. I'm trying to make it so that, whenever the player is holding this sword, they gain 1 XP every 5 seconds. So far, I have not been able to get it to work. I've also tried a similar setup with Add 1 XP to Source Entity too. Can anyone tell me what's wrong with my procedure here? I figure it'd not the right way to go about this but so far I'm stumped. It's set to run in the "When tool in hand tick" slot.
Edited by PansyGum on Fri, 02/12/2021 - 17:48
The local variable will not persist across procedure runs. Read https://mcreator.net/wiki/variables
Also,I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3E…;
Thanks for the response Klemen. I checked out the link and switched to using NBT tags - works like a charm. I'll do some more reading before posting next time, the documentation is really helpful.