Lack of hard max levels for enchantments #6661
Labels
Category: Core
Related to internal functionality
Status: Debugged
Cause of the bug has been found, but not fixed
Type: Enhancement
Contributes features or other improvements to PocketMine-MP
Plugin information
Bug only happens with certain plugins (describe below)
Problem description
Enchantments such as Fire Aspect cause crashes somewhere above level 400 because the fire ticks will exceed the internal storeable NBT limits.
We currently don't enforce any limits on hard max level for enchantments. This was intended to allow plugins to give whatever levels of enchantment that they want irrespective of what's available through commands or enchanting tables. However, some hard limits need to be set to ensure that enchantments don't just randomly crash the server when used.
This is a parent issue for #4629.
Expected behaviour
It shouldn't be possible to give a Fire Aspect enchantment with level 1000, because this results in an indirect server crash which is difficult to debug: https://crash.pmmp.io/view/12162812
PocketMine-MP version
5.26.0
PHP version
N/A
Server OS
N/A
Game version (if applicable)
No response
The text was updated successfully, but these errors were encountered: