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

The c=1 argument does not behave correctly in a scoreboard command within an execute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.8.3, Minecraft 1.8.4
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Community Consensus

      Description

      When doing the following:

      /execute @e[type=ArmorStand] ~ ~ ~ scoreboard players set @e[c=1] closest 1

      You would expect the armor stand to add the score to itself(perhaps not if there is another entity in the exact same spot). This is not (always) the case. The argument c=1 should select the closest entity, but it doesn't (always) do this.

      Recreate using these commands:

      /summon ArmorStand
      /scoreboard objectives add closest dummy
      /execute @e[type=ArmorStand] ~ ~ ~ scoreboard players set @e[c=1] closest 1

      The score of 1 will be set to the player, not to the armor stand.

      A workaround for this particular situation would be to use r=0, which selects the armor stand if the player is not also in the same block(while it should even target the player at all in this case). There are, however, other situations where such a workaround is not possible.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              inasm Nasm Nasmus
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: