Project MMO

Project MMO

10M Downloads

Skill Bonuses Multiplying When Saving and Restarting

SomewhatDamaged opened this issue ยท 1 comments

commented

Describe the bug
Every time the game is reloaded, leather armor (haven't tested with others) bonuses get larger and the game lags more.

Expected behavior
The bonuses should be consistent despite reloading and there shouldn't be this lag.

To Reproduce
Steps to reproduce the behavior:

  1. Give yourself leather armor
  2. Put on leather armor
  3. Save and exit, then load game again. Observe bonus is larger (and you gain more xp)
  4. Keep doing 3 and notice lag is increasing too

Screenshots
image
image
image

Versions:

  • Minecraft: 1.19.2
  • Loader: Forge 43.1.34
  • PMMO: 1.19.2-0.5.2

Additional context
Exiting the game and starting it fresh resets back to normal values again.

commented

Note to self.

  • add TooltipRegistry#clearRegistry
  • call TooltipRegistry.clrearRegistry() in CP_ClearData#handle

the cause is due to multiple entries into the list for the same item which occurs during client join when the CP_SyncData_Objects packet calls Core#registeryNBT.