mojira.dev
MC-271566

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

[media]

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.

Attachments

Comments 3

Please update the description to include steps to reproduce this issue, as well as expected VS observed results.

Please also attach any needed datapacks, resourcepacks, screenshots, videos or worlds needed to help reproduce this issue.

The report is now updated with additions.

Can confirm.

[media][media]

Wyvernity

gegy

Community Consensus

Platform

Important

Crash

24w18a

24w20a

Retrieved