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

Summoning at an entity via execute fails silently if it is in a different dimension than the source of the command.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 17w50a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed

      Description

      Overview

      Summoning at an entity via execute fails silently if the entity is in a different dimension than the source of the command or function. The entity does not appear at the specified coordinates in any dimension, and there is no error message in the log or chat.
      This is inconsistent with other behaviour. For example, the particle command does work at the entity's location in any dimension regardless of the dimension the command or function originates in.

      • A function run from #minecraft:tick counts as running in the Overworld.
      • A function or command run by a command block or player runs in the dimension it is in.

      Simple demonstration

      • Drop an Iron Sword and, without going to another dimension, run the command /execute at @e[type=minecraft:item,nbt={Item:{id:"minecraft:iron_sword"}}] run summon minecraft:armor_stand ~ ~ ~
        • An Armor Stand will appear at the item's location and the message Summoned new Armor Stand will appear in chat.
      • Drop an Iron Sword in the spawn chunks of the Overworld, go to the Nether, and run the above command. The same message will appear in chat, but when you go back to the Overworld there will be no Armor Stand at the item's location.

      Example data pack

      The attached data pack demonstrates this more exhaustively, and how it is inconsistent with the particle command. There are 3 functions that each execute a secondary function as and at a sword item on the ground. The secondary function:

      • Summons an invulnerable, no gravity Armor Stand holding that type of sword at that location.
      • Spawns some particles at that location.
      • Gives a chat message.
      • Kills the item.

      The three functions are triggered in different ways:

      • dimension_execute_test:player_tick - The one for the Wooden Sword is run automatically on each player every tick using an advancement.
      • dimension_execute_test:minecraft_tick - The one for the Stone Sword is run automatically before every tick using #minecraft:tick
      • dimension_execute_test:manual - The one for the Iron Sword can be run either by a player or in a command block.

      Anomalous behaviour:

      • Drop a Stone Sword in the Nether or End. The Armor Stand will not be summoned, but the particles and chat message will appear.
      • Drop an Iron Sword in the spawn chunks of the Overworld, go into the Nether or End and run function dimension_execute_test:manual The Armor Stand will not be summoned, but the chat message will appear (and presumably the particles would too if someone was there to observe it.)
      • Put function dimension_execute_test:manual in a repeating, always active Command Block. If you drop an Iron Sword in dimensions other than the one the Command Block is in, the Armor Stand will not be summoned, but the particles and chat message will appear. (Easiest to test with the Command Block in the spawn chunks of the Overworld.)
      • Build a device in the spawn chunks of the Overworld that, after a delay, drops a Wooden Sword. Go into the Nether or End. When the device drops the Wooden Sword the Armor Stand will not be summoned, but the chat message will appear (and presumably the particles would too if someone was there to observe it.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                RichardAHallett Richard A. Hallett
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: