Using ~ ~ ~ coordinates everything works fine, but if we teleport the entity using ^ ^ ^ coordinates, after a couple of triggers they will get messed up.
For example, let's summon a cat:
/summon cat 0 27 0 {NoAI:1b}
We'll teleport him a few times using ^ ^ ^:
/execute as @n[type=cat] at @s run tp @s ^ ^ ^0.1
Let's see what coordinates he's on and see if he's in the wrong position:
/data get entity @n[type=cat] Pos
I make a game where the entity moves on 0.1 cell every tick, and in a certain place I need in 25 steps to perform an action, but because of the strange coordinate system on the 25th step it turns out that it is not on the 2.5 coordinate but somewhere 2.49998.....
I have to force a 26th step, but it will be counted one cell more.😞
Attachments
Comments 4
I have the same problem. I thought my Xaeros minimap was wrong about coords, but now I get this is a 1.21 bug.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm. Although it might be just how doubles are stored since it after repeating it 7 times it rounds up to 1.2