Variables Resetting When An Item Is Received.

Started by absoluteRat on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Variables Resetting When An Item Is Received.

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.

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is no procedure with…
Mon, 08/19/2024 - 17:55

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.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nl I'll get on that…
Tue, 08/20/2024 - 01:19

nl I'll get on that troubleshooting and post a reply/see what I find out.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update: I added my stat…
Fri, 08/23/2024 - 08:17

Update: I added my stat processor procedure to OnPlayerTick and it worked itself out.