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

Placing blocks triggers item_used_on_block, affecting "Not Quite 'Nine' Lives" advancement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 20w20b, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 6, 20w30a, 1.16.2, 1.16.4, 20w49a, 21w03a, 21w06a, 21w15a, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 22w15a, 1.19.2, 1.19.3, 1.19.4, 23w16a, 1.20.2, 23w43a, 1.20.4, 23w51b
    • None
    • Confirmed
    • Advancements
    • Low
    • Platform

      The bug

      The item_used_on_block trigger also works when placing blocks. This causes the "Not Quite 'Nine' Lives" vanilla advancement to be granted when placing glowstone on the respawn anchor instead of charging the respawn anchor.

      This could be intended, but then there should at least be a condition to check whether this was a block placement or a block altering.

      How to reproduce

      Using the vanilla advancement
      1. Set a respawn anchor with charges state set to 4
        /setblock ~ ~ ~ respawn_anchor[charges=4]
      2. Shift right click on it with glowstone
        The "Not Quite 'Nine' Lives" advancement is granted
      Using a generic advancement
      1. Create an advancement with the item_used_on_block trigger and a function
        {
          "criteria": {
            "place": {
              "trigger": "minecraft:item_used_on_block",
            }
          },
          "rewards": {
            "function": "test:use_item"
          }
        }
        
      2. Create a function that prints a message every time this advancement is granted
        advancement revoke @s only test:use_item
        say used item!
        

        The advancement triggers every time you place a block

        1. MC-184335.mp4
          3.61 MB
        2. MC-184335.png
          MC-184335.png
          1022 kB

            Unassigned Unassigned
            Misoloo [Helper] Misode
            Votes:
            17 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              CHK: