Started by
Sky_PC
on
Topic category: Help with Minecraft modding (Java Edition)
Im currently trying to make a weapon which deals more damage the faster the player goes. Ive come to a roadblock though, since for some reason player velocity/ delta movement is only tracked when the player is falling. if anyone knows why this is happening or how i can make do this some other way, please leave a comment. Thanks
try using z or y first. im using the delta movements right now to track a swimming feature so if i see anything that works ill let you know!
Contrary to what some say, delta movement only indicates the direction in which your entity is moving. I did several tests because I wanted to create running and walking animations depending on speed, but I realized that delta motion indicates how much the entity is moving in a given direction. Therefore, even if it is moving, the delta motion can be negative, as you can see in the image where I punched the mob to a negative coordinate, with the left representing the x-axis and the right the z-axis. That is, delta motion cannot be used to collect speed differences, as some say, because it would be impossible to obtain a fixed value for comparison. Perhaps it is useful for creating something more specific or just to identify if the entity is moving. It can also be used to check if the entity is moving to a negative or positive coordinate. The delta movement is just being taked on Y delta because when something fall or goes up it moves 1 block. https://ibb.co/Q7YTRz80 this is the link to the image because i couldnt put it her.