-
Bug
-
Resolution: Fixed
-
24w18a
-
None
-
Confirmed
-
Crash, Data Packs
-
Important
-
Platform
Summary
When an enchantment has a big weight (close to Integer.MAX_VALUE), adding other enchantments' weights will make the total exceed the integer limit, causing a crash.
Steps to Reproduce
- Create a world with the attached data pack, which makes the Sharpness enchantment have Integer.MAX_VALUE weight.
- Summon a villager.
- Place a grindstone.
Expected Result
The data pack should fail to load, or no crash should occur.
Actual Result
Game crashes.