A custom enchantment setting minecraft:projectile_count to 2147483647 is accepted so when a crossbow with this enchantment is loaded the game crashes.
Steps to reproduce:
Create a new world with the attached data pack enabled
Run the following commands:
/summon minecraft:pillager ~ ~ ~ {equipment:{mainhand:{id:"minecraft:crossbow",count:1,components:{"minecraft:enchantments":{"test:huge_proj":1}}}}} /summon minecraft:iron_golem ~4 ~ ~Wait for the pillager to finish loading its crossbow and observe the crash.
Observed result:
The game crashes
Expected result:
The projectile count value should be clamped to a reasonable upper limit :}
Attachments
Comments 2
This duplicates MC-313735
Thank you for helping us improve Minecraft! We saved your files: