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

Cannot detect using spawn egg on fluids/waterlogged portion of blocks with item_used_on_block advancement criteria

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.3, 23w07a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2, 1.19.4 Pre-release 3, 1.19.4 Pre-release 4, 1.19.4 Release Candidate 2, 1.19.4, 23w12a, 23w13a, 23w14a, 23w17a, 1.20, 1.20.4
    • None
    • Confirmed
    • Advancements
    • Normal
    • Platform

      The Issue

      When using a spawn egg on fluids (water and lava) or the waterlogged portion of a non-whole block, an advancement with correct item_used_on_block criteria fails to be rewarded.

      Steps to Reproduce

      • Enable attached datapack (spawneggbug.zip), which contains the following advancement:
      {
          "criteria": {
              "requirement": {
                  "trigger": "minecraft:item_used_on_block",
                  "conditions": {
                      "item": {
                          "items": [
                              "minecraft:pig_spawn_egg"
                          ]
                      }
                  }
              }
          },
          "rewards": {
              "function": "spawneggbug:detect"
          }
      }
      • Enter Creative mode (note that this bug is not particular to Creative mode, but it is better for demonstration purposes)
      • Obtain a pig spawn egg (note that this bug affects other spawn eggs; the datapack only tracks pig spawn eggs for demonstration purposes)
      • Spawn a pig on land
      • Observe pig spawns with "[PLAYERNAME] I placed a spawn egg!" message sent in chat (advancement succeeds)
      • Spawn a pig in water/lava (click on the fluid, not on any block wireframe)
      • Observe pig spawns with no "[PLAYERNAME] I placed a spawn egg!" message in chat (advancement fails)
      • Give yourself another pig spawn egg with the following command:
      /give @s pig_spawn_egg{CanPlaceOn:["minecraft:campfire"]}
      • Place a campfire underwater (note that this affects other waterloggable blocks; campfires are picked for demonstration purposes)
      • Enter Adventure mode
      • Place second pig spawn egg against waterlogged non-solid edge of the campfire
      • Observe pig spawns with no "[PLAYERNAME] I placed a spawn egg!" message in chat (advancement fails)

      These steps have also been recorded and attached to this report for ease of visualization (demonstration.mp4).

      Note

      A scoreboard objective with minecraft.used:minecraft.[ENTITY]_spawn_egg criteria is able to detect using spawn eggs in the cases where the advancement cannot. However, the expected behavior is still that the advancement could detect such cases as well, since the item is technically used against a block.

            Unassigned Unassigned
            Evtema3 Evtema3
            Votes:
            8 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: