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

placed_block trigger doesn't detect corresponding block from buckets (but does detect the bucket item itself)

XMLWordPrintable

    • Confirmed

      Given the following advancement, placed in world/data/advancements/custom/buckets.json:

      {
          "criteria": {
              "trigger_1": {
                  "trigger": "minecraft:placed_block",
                  "conditions": {
                      "block": "minecraft:water"
                  }
              },
              "trigger_2": {
                  "trigger": "minecraft:placed_block",
                  "conditions": {
                      "block": "minecraft:flowing_water"
                  }
              }
          },
          "requirements": [["trigger_1"], ["trigger_2"]],
          "rewards": {
              "commands": [
                  "/advancement revoke @s only custom:buckets",
                  "/say Placed"
              ]
          }
      }
      

      Placing water with a water bucket will not fulfill the advancement (same goes for lava). However, the advancement does still work if not specifically looking for a block; the following works fine:

      {
          "criteria": {
              "trigger_1": {
                  "trigger": "minecraft:placed_block",
                  "conditions": {
                      "item": {
                          "item": "minecraft:water_bucket"
                      }
                  }
              }
          }
      }
      

      This differs from other items that have a corresponding block ID separate from its own item ID, such as repeaters (where the following works):

      {
          "criteria": {
              "trigger_1": {
                  "trigger": "minecraft:placed_block",
                  "conditions": {
                      "block": "minecraft:unpowered_repeater",
                      "item": {
                          "item": "minecraft:repeater"
                      }
                  }
              }
          }
      }
      

            dinnerbone [Mojang] Nathan Adams
            skylinerw [Mod] Skylinerw
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: