minecraft.used:minecraft.goat_horn doesn't increase when using goat horns.
- Create a scoreboard objective for tracking the use of a goat horn and set it to display on the sidebar.
- Obtain a goat horn and use it.
- Take note as to whether or not minecraft.used:minecraft.goat_horn increases when using goat horns.
The scoreboard doesn't increase.
The scoreboard would increase.
Code analysis by Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19 Pre-release 2 using Mojang mappings.
If we look at the above class, we can see that the awardStat() method (the method responsible for incrementing player statistics) is never called throughout this piece of code, thus making minecraft.used:minecraft.goat_horn not increase when using goat horns.
Simply calling the awardStat() method where appropriate within this piece of code will resolve this problem. The following line of code can be used to fix this issue.