-
Bug
-
Resolution: Unresolved
-
None
-
1.20.1, 1.20.2, 1.21.2 Release Candidate 1
-
None
-
Confirmed
-
Statistics
-
Low
-
Platform
When you place a lilypad or frogspawn block on water, it doesn't increment the "used" statistic for those item types. This isn't consistent with other BlockItems that can be placed, like stone, dirt, flowers, etc.
Steps to reproduce
- Create a scoreboard objective to track uses of lilypads with
/scoreboard objectives add UseLily minecraft.used:minecraft.lily_pad /scoreboard objectives setdisplay sidebar UseLily
- Place lily pads on water and see that the objective doesn't show up indicating nothing is getting added to the objective for the player.
Cause
This is caused by PlaceOnWaterBlockItem#use delegating to the super.useOn method and then not handling the result in a way to increment the stat. Looking through the code, it seems that any subclass of Item that overrides the use method manually handles incrementing the "used" stat for that item, but lilypads and frogspawn do not do this.