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

dubious execute/scoreboard/@e interaction

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.10
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10, Java 1.8.0_25, single player
    • Confirmation Status:
      Unconfirmed

      Description

      The @e target doesn't always seem to work properly in execute/scoreboard command combinations, as in the following command:
      /execute @e ~ ~ ~ scoreboard players add @e[c=1] xyz 1

      What I expected to happen was...:
      Each entity's objective "xyz" score should increase by 1.

      What actually happened was...:
      My objective "xyz" score increased by 1 for each entity.

      Steps to Reproduce:
      1. /scoreboard objectives add xyz dummy
      2. /scoreboard objectives setdisplay sidebar xyz
      3. /summon Boat
      4. /execute @e ~ ~ ~ scoreboard players add @e[c=1] xyz 1

      I'd expect each entity to have its "xyz" score increased by 1. Instead, only mine is increased by 2 (or more, if there are other entities around). Note this seems to only affect the scoreboard command; for example:
      /execute @e ~ ~ ~ tp @e[c=1] ~ ~ ~-8
      teleports each entity 8 blocks north, as expected. Interestingly:
      /execute @e ~ ~ ~ scoreboard players add @e[c=1,type=!Player] xyz 1
      also works as expected; namely, xyz+1 for all entities except me, +1 additional for the one closest to me.

      I know I can work around this by just not using execute:
      /scoreboard players add @e xyz 1
      but that's only sufficient in this simple example. If I want to use execute's detect clause to only increment the score for entities standing on cobblestone, for instance, I can't do it a single command.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              QuarterAnimal Bryan Bowe
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: