1.18.2 - Autovalue XP Gain Events Aren't Scaled on First Gain Attempt (Server)
MattB70 opened this issue ยท 2 comments
Describe the bug
When performing an action that rewards autovalue generated XP, the given XP is not scaled by the given skill's "Skill Modifiers" multiplier on the first attempt per player connected session. For example: The first time breaking a mod block after joining the server, the player will receive the raw autogenerated XP value, in this example it is 487 mining XP. Breaking the block again rewards the correctly scaled XP value, in this case 611 mining XP, as it has been scaled by the mining "Skill Modifiers" XP scalar. This happens with a clean mod-less install, and with default generated configs.
I haven't read PMMO 2.0 yet, so I'm not sure where this bug might be, but I'm sure it's probably already fixed in the later versions.
Expected behavior
The "Skill Modifiers" scalar should apply immediately on player join, rather than after the first update of a given autogenerated xp gain event.
To Reproduce
Steps to reproduce the behavior:
- Install mentioned versions
- Set a non 1 multiplier to a skill
- perform an action to gain xp related to that skill with an autovalue generated value
- repeat the same action as before again
Versions:
- Minecraft: 1.18.2
- Loader: Forge-40.2.21
- PMMO: 1.18.2-6.2.6
Additional context
This is related to the "no XP gain after first block break" issue I mentioned in discord.
So, i'm getting a different behavior. I'm getting the exact amount from autovalues on the first iteration then a multiplier on the ones that follow. here are my reproduction steps
- new world
- disable default data
- set mining multiplier to 10
- break a coal or copper ore block. received 100 (expected 1 basic block break xp * 10 rarities xp * 10 skill modifier)
- break another block of the same type. received 1000xp.
I am getting consistent behavior where the first break is lower and all subsequent breaks are the same, but it can't pinpoint why it's happening.
I just did the same test, and confirmed the same thing.
I also did a test with a 0.5 skill multiplier, and it's clear that the [Levels."Skill Modifiers"] is applied twice on all auto-generated values on the player's subsequent iterations. If it doesn't happen in the later versions of the mod, then it was probably some double call somewhere that will be a pain to find.
I'm just going to not use the multipliers for now, and just override the vanilla data in my pack.