Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Fix duplicate egg throw sound

Open Lulu13022002 opened this issue 2 years ago • 1 comments

This fix an issue with the egg throw sound being played twice (slightly noticeable with the volume of the sound compared to other projectile) and the enderpearl that didn't reset its cooldown clientside when the PlayerLaunchProjectileEvent is cancelled.

Lulu13022002 avatar Nov 04 '23 14:11 Lulu13022002

In all the cases where the launch projectile event is fired... shouldn't we uncomment the user.awardStat(Stats.ITEM_USED.get(this)); line at the bottom and remove the one wee add? It still would be correct and less vanilla diff. The only thing we would need to handle above was the itemstack shrink. You could also just leave that at the bottom if you added a new boolean at the top that determined if the stack should shrink. I think that is cleaner.

Also, for EggItem specifically, we can leave the playSound at the bottom too since that will fire after the event anyways.

Machine-Maker avatar Nov 04 '23 19:11 Machine-Maker