1.17.1, 21w37a, 21w38a, 21w43a, 1.18 Pre-release 1, 1.18.1, 22w05a, 1.18.2, 22w17a, 1.19, 1.19.1, 1.19.2, 1.19.3
minecraft.used:minecraft.CAMPFIRE_COOKABLE_ITEM doesn't increase when placing food on campfires.
- Create a scoreboard objective for tracking when you use some raw beef and set it to display on the sidebar by using the commands provided below.
- Obtain some beef, eat it, and take note of how the scoreboard increases.
- Place down a campfire and place some beef onto it.
- Take note as to whether or not minecraft.used:minecraft.CAMPFIRE_COOKABLE_ITEM increases when placing food on campfires.
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.18.1 using MCP-Reborn.
If we look at the above class, we can see that no stats are awarded when placing food on campfires. The only stat that is awarded is the INTERACT_WITH_CAMPFIRE stat. This is evident through the following line of code:
Simply adding a line of code that awards a stat when placing some food on a campfire should resolve this problem. The following line of code could be used in order to fix this: