Started by
absoluteRat
on
Topic category: Help with Minecraft modding (Java Edition)
I have variables that represent a players' stats in-game. When I give myself an item, the variables, all eight of them, return to their default value of 0.
>5min Video providing visual walkthrough of my problem.
I have used this system before and have not encountered this issue.
There is no procedure with the pick up item trigger?
Does the stat reset happen with any item?
Did you check that the stats shown by the GUI are real? By this I mean that if... I'll give you an example:
(stats at 0 since the start of the game)
You hit a bug with an iron sword and it does 6 damage.
You increase your strength.
You hit the same bug with the same sword and it does 7 damage.
You give yourself an item and your stats reset.
-> Did you check that when you hit it, the damage went back to 6? To rule out that the problem is just the information in the GUI.
Sorry if I don't contribute anything, I'm still a bit new to this.
nl I'll get on that troubleshooting and post a reply/see what I find out.
Update: I added my stat processor procedure to OnPlayerTick and it worked itself out.