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

"attribute <target> <attribute> get" returns a rounded value when used in execute store result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21.4
    • None
    • OS: Windows 10, Java Version 8 update 431, Java 1.8.0_431-b10
    • Unconfirmed
    • (Unassigned)

      The command: "execute store result storage <storage> <path> <type> <scale> run attribute <target> <attribute> get" stores a rounded down value in the specified location. 

      expected behavior:

      the command should store the original value.

       

      This happens even though running the command: "attribute <target> <attribute> get" returns in chat the correct value

       

      commands:

      /attribute @n[type=pig] minecraft:safe_fall_distance base set 1.234
      /attribute @n[type=pig] minecraft:safe_fall_distance modifier add minecraft:aaa 5.678 add_value
      /attribute @n[type=pig] minecraft:safe_fall_distance get
      /execute store result storage minecraft:bug test double 1 run attribute @n[type=pig] minecraft:safe_fall_distance get
      /data get storage minecraft:bug
      /data get entity @n[type=pig] attributes

       

      Also happens with float

            Unassigned Unassigned
            SpecialButNot204 SpecialButNot204
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: