Game crash on insufficient "ammo_use" amount
If the amount of ammo item in inventory is less than ammo count of the enchantment, the game crashes.
Steps to reproduce:
1) Download test_datapack.zip
example data pack and put it on your world.
2) Get a crossbow and enchant it with this command:
/enchant @s test_datapack:test_enchantment 5
3) Put 1 arrow in your inventory and switch to survival mode.
4) Try to reload the crossbow. The game crashes.
Expected Result:
The crossbow shouldn't be reloadable and the game shouldn't crash.
Observed Result:
The game crashes.
The related images and the crash log is attached.
2024-05-04, 06:26 PM
2024-05-14, 01:49 PM
2024-05-14, 01:49 PM
5
3