Started by
BlueAwesomeDinosaur
on
Topic category: Help with Minecraft modding (Java Edition)
I was messing around with velocity and made an item to track it. I noticed something that explained why I can't use velocity to track player movement. I found that unless the player is off the ground their x and z velocity is always 0. Is there a way to track actual movement of the player and is this a bug?
EDIT: Additionally, flying is not tracked either, so only jumping is tracked by velocity I guess...
Edited by BlueAwesomeDinosaur on Wed, 06/10/2020 - 19:52
Interesting, how exactly you tracked the player velocity?
If item in main hand is provided item stack or off hand item is provided itemstack then
send message create text with "Current Velocity: " + x velocity of target entity + "X, " + y velocity of target entity + "Y, and" + z velocity of target entity + "Z"
This is a more simplified version of the block code, but how it works is pretty simple.
I simplified it just so I would not have to write excessive things like "create text with" seven times over and some other things I thought was unnecessary to say.
possibly there is a way to track the position, then compare it to current position and calculate the velocity with that?
I did find it was just an issue with the join block or something, but I have found bugs involving the velocity block, so if you can you should tend to stay away from it because it can cause problems like ghosting potion effects and such.