`pmmo:attribute` Perk Not Respecting Attribute Caps
SomewhatDamaged opened this issue ยท 1 comments
Describe the bug
Making a perk that tries to raise an attribute higher than the maximum allowed causes an error (it should probably be more explicit about why it is failing).
[22:55:43] [Render thread/INFO] [minecraft/ChatComponent]: [System] [CHAT] An unexpected error occurred trying to execute that command
Expected behavior
Either notifying the user that the perk is badly configured or silently giving the max allowed.
To Reproduce
Steps to reproduce the behavior:
- Make a perk like:
[[Perks.For_Event.SKILL_UP]]
perk = "pmmo:attribute"
skill = "endurance"
attribute = "minecraft:generic.armor"
per_level = 1
max_boost = 40
- Try to give yourself 40 levels in
endurance
- See error
Versions:
- Minecraft: 1.20.1
- Loader: Forge-47.1.3
- PMMO: 1.20.1-1.2.19
Additional context
Kitty.Impossible.mp4
Unfortunately, Attributes do not have a property that defines their max value. While I could set caps on the vanilla attributes, This would conflict with mods that increase the cap and would not help with modded attributes. In this scenario, I am going to put the burden on the user to understand and respect the attribute limits.