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

Return values from /data get when a scale is specified does not handle types correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.14 Pre-Release 5, 20w13b
    • None
    • Confirmed
    • (Unassigned)

      When using 

      /data get... ...[path] (scale)

      where a scale is specified, does not return the correct number type.

      Here, running the command 

      /data get entity @e[type=minecraft:cow,limit=1] Motion[1]

      will return the y motion value for the cow, which is stored as a double.

      However, here, after running

      /data get entity @e[type=minecraft:cow,limit=1] Motion[1] 1

      with a return scale of 1 specified, the value returned is -1. I assume this is due to returning the result after the scale factor as an integer, the return value should match the type of the attribute fetched, (i.e this command should return -0.078400...d) 

            Unassigned Unassigned
            ahiddenwaffle ahiddenwaffle
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: