A custom enchantment with an empty minecraft:crossbow_charging_sounds or minecraft:trident_sound list loads without any sort of validation errors. So when a mob or player begins charging the enchanted crossbow 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:empty_crossbow":1}}}}} /summon minecraft:iron_golem ~3 ~ ~Wait for the pillager to start charging its crossbow and observe the crash.
Observed result:
The game crashes.
Expected result:
Empty enchantment sound lists should be rejected when loading the data pack, or handled without crashing the game when the item is used.
Thank you for helping us improve Minecraft! We saved your files: