mojira.dev
MC-274181

Float values seem to undergo conversion to int during certain operations

 

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)

  1. Output: 6.0f <(2f*3)>, but expected: 7.0f <2f*3.5f>

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

 

Linked issues

Attachments

Comments 2

Thank you for your report!
However, this issue is Incomplete.

Your report does not contain enough information. As such, we're unable to understand or reproduce the problem.

Please update the description to include steps to reproduce this issue, as well as expected VS observed results, and a descrption of the issue itself.

Please also attach any needed commands, datapacks, resourcepacks, screenshots, videos or worlds needed to help reproduce this issue.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Thank you for your report!
We're tracking this issue in MC-121824, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Creeperhahaha1

(Unassigned)

Unconfirmed

Commands

1.21

Retrieved