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

'/data get' can return imprecise values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 18w02a
    • Confirmed

      The bug

      Running /data get can return imprecise values depending on the value type.

      How to reproduce

      1. /summon armor_stand ~ ~ ~ {Pose:{Head:[0.01f,0.01f,0.01f]}}
      2. /data get entity @e[type=armor_stand,sort=nearest,limit=1] Pose.Head[0] 10000
        → Result is 99
      3. /data get entity @e[type=armor_stand,sort=nearest,limit=1]
        → NBT says [0.01f,0.01f,0.01f]. /data get is incorrectly rounding 0.01f to 0.009999

            dinnerbone [Mojang] Nathan Adams
            onnowhere Onnowhere
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: