how to reduce the delay of playing a sound when I'm attacking using my custom item?
here is the code
"initial_state": "default",
"states": {
"default": {
"transitions": [
{
"swing": "query.get_equipped_item_name('main_hand') == 'shovel' && variable.attack_time > 0.0"
}
]
},
"swing": {
"transitions": [
{
"default": "!variable.attack_time > 0.0"
}
],
"on_exit": [
"/playsound shovel.swing @s"
]
}
}
}```