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

Execute on origin does not work for non-LivingEntities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 23w07a, 23w43b, 24w13a
    • None
    • Confirmed
    • Commands
    • Low
    • Platform

      If you summon an area effect cloud, and set its Owner tag to a non-LivingEntity's UUID, then run this command:

      /execute as @e[type=minecraft:area_effect_cloud] on origin run say hi
      

      The entity with the UUID will not say anything, and nor will the AEC.

      However, if you copy a player's UUID into the Owner of the AEC, it works fine and produces the result:

      [Player] hi

      If you then set the AEC's Owner back to the non-LivingEntity, it continues to act as if the player was the origin, and produce the same result:

      [Player] hi

      Exact commands to reproduce:

      summon minecraft:area_effect_cloud ~ ~ ~ {Age: -2147483648, Duration: -1, WaitTime: -2147483648, Tags:["hi"]}
      summon block_display ~ ~ ~ {Tags:["hi"]}
      
      data modify entity @e[type=area_effect_cloud, tag=hi, limit=1] Owner set from entity @e[type=block_display, tag=hi, limit=1] UUID
      
      execute as @e[type=area_effect_cloud, tag=hi] on origin run say hi
      ### Expected output: [Block Display] hi
      ### Actual output: nothing
      
      data modify entity @e[type=area_effect_cloud, tag=hi, limit=1] Owner set from entity @s UUID
      
      execute as @e[type=area_effect_cloud, tag=hi] on origin run say hi
      ### Expected output: [Player] hi
      ### Actual output: [Player] hi
      
      data modify entity @e[type=area_effect_cloud, tag=hi, limit-1] Owner set from entity @e[type=block_display, tag=hi, limit=1] UUID
      
      execute as @e[type=area_effect_cloud, tag=hi] on origin run say hi
      ### Expected output: [Block Display] hi
      ### Actual output: [Player] hi

      This behaviour resets when you reload the world.

            Unassigned Unassigned
            TorNato TorNato
            Votes:
            25 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              CHK: