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

Player argument syntax does not recognize decimals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.8, Minecraft 1.8.1
    • None
    • Windows 7
    • Unconfirmed

      Using decimals in the arguments for a player causes the command to fail. It appears that the player arguments are registered as the name of a player or it gives an error of "The entity UUID provided is in a invalid format". This is present in both Singleplayer and Multiplayer.

      Doing /tp @a[ry=95.0,rym=85.0] ~0 ~10 ~0 should teleport any player looking in that direction. It instead says "The entity UUID provided is in an invalid format" without moving the player. If the command were to be /tp @a[ry=95,rym=85] ~0 ~10 ~0 , the error is not thrown up and the player is teleported if looking in the specified direction.

      Steps to reproduce:

      1. Type /tp @p ~0 ~0 ~0 90 0
      2. Type /testfor @p[ry=95,rym=85] (Should say "Found [Your username here]")
      3. Type /testfor @p[ry=95.0,rym=85.0] (Should say "The entity UUID provided is in an invalid format")

      This also applies to giving coordinates with decimals as shown in this (MC-9074) bug report. I wanted to expand on it by showing rotation values being non-functional and to bring the issue to light, as the original report was from nearly two years ago. If you would like to reproduce the issue using coordinates instead of rotational values, here are the commands:

      1. Type /tp @p 0 1 0
      2. Type /testfor @p[0,1,0,r=1]
      3. Type /testfor @p[0.0,1.0,0.0,r=1]

      In the examples I'm using easy numbers for the sake of simplicity, but a real-minecraftian-world command that needs this kind of usage looks more like this:

      /scoreboard players set @a[-34,21,128,r=10,rym=-122.2,ry=-119.1] hBlock 1
      The attached image shows the result of using this command.

      When using scoreboards, a player is created with the name "@a[-34,21,128,r=10,rym=-122.2,ry=-119.1]" instead of giving a score of 1 to players who are facing in that direction. If you wish to reproduce this, here are the commands:

      1. Type /scoreboard objectives add test dummy Test
      2. Type /scoreboard objectives setdisplay sidebar test
      3. Type /scoreboard players set @p[r=5] test 1 (Should display your username on the sidebar with a 'test' score of 1.
      4. Type /scoreboard players set @p[r=5.0] test 1 (Instead of finding the player, it creates a player with the name "@p[r=5.0]")

      Note: This has been brought up in this (MC-9074) bug report, but it's nearly two years old and doesn't show what happens when used with scoreboards or rotation values. It's also marked as "resolved" even though the problem has never been fixed.

            Unassigned Unassigned
            jaruca Jar Uca
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: