Blocking XP Not Awarded
Tyrius1 opened this issue ยท 1 comments
Describe the bug
With shield block set to give endurance: 100 on zombie they are giving 0 xp instead.
Expected behavior
That you would gain endurance xp based on the amount of damage blocked.
To Reproduce
Steps to reproduce the behavior:
- Set "SHIELD_BLOCK": { "endurance": 100 }
- spawn zombie and let it hit you while you are blocking
- gain 0 endurance experience
Versions:
- Minecraft: 1.19
- pmmo-1.19-0.0.4.jar
Additional context
The other entries here are working as expected.
So this actually wasn't a bug, but I changed it anyways.
The way the event worked was that the shield itself has the shield block XP value not the damage source. That was obviously not very intuitive and also limited the amount of variability you could get from block actions. I also had the Shield_Block property as being tagged as an entity event in the code, which means I probably at some level had that same thought.
The next update will include a change to the shield block declaration. Since this affects existing configurations, this will result in a minor version change, bumping us to 0.1.0.