Hello !
When I try to store decimal informations like player position, with the following command :
/execute store result storage minecraft:test PosX double 1 run data get entity @p Pos[0] ;
the storage value is the floor of the taken value. I see that with the following command :
/data get storage test PosX .
I got 33.931265216151d for the first one and 33.0d for the second.
I have this problem for these types : double ; float
Thanks a lot !
Linked issues
duplicates 1
Comments 4
Yeah... execute store stores command results, which are (intentionally) integers, meaning no decimals. /data modify was mainly an addition for this reason, to copy one NBT value directly to another.
If you want it in a score, use a scale.
Thank you for your report!
We're tracking this issue in MC-121824, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
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
📓 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.
The result value of commands is always an integer.
You can use this command to store the decimal information: