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

Float values seem to undergo conversion to int during certain operations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21
    • None
    • Unconfirmed
    • Commands

       

      The float value seems to undergo conversion from float to int during operations.

      When set a float value in the storage, if it is multiplied by any number in the execute store command, operation will be converted to an int.

      Steps to Reproduce:

      1. set float value 

      data merge storage abc:test {value:3.5f} 

      2. Get the value from storage, multiply it by 2, and set the new value back to storage

      execute store result storage abc:test value float 2 run data get storage abc:test value

      3. display value (on my screenshot) # Output: 6.0f <(2f*3)>, but expected: 7.0f <2f*3.5f>

      tellraw @p {"nbt":"value","storage":"abc:test","color":"light_purple"} 

       

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

              Created:
              Updated:
              Resolved: