I'm trying to make a custom grab-bag, but for some reason the sounds don't seem to be working properly. They don't play at all, but the rest seem to be working properly.
ItemEvents.rightClicked(e => {
let loopcount = 1
let i = 0
if(e.item.id == "kubejs:coin_purse") {
if (e.player.crouching == true) {
loopcount = e.item.count
}
for (i = 0; i < loopcount; i++) {
e.item.count--
e.entity.playSound("minecraft:item.armor.equip_gold")
}
}
})