Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-264274

Lily pad and frogspawn do not increment "used" statistic like other placeables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.1, 1.20.2
    • 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

      1. Create a scoreboard objective to track uses of lilypads with
        /scoreboard objectives add UseLily minecraft.used:minecraft.lily_pad
        /scoreboard objectives setdisplay sidebar UseLily
        
      2. 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.

            Unassigned Unassigned
            Machine Maker Jake Potrebic
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: