I discovered what the Delta Movement Really does and it is NOT a velocity check

Started by KrathK on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I discovered what the Delta Movement Really does and it is NOT a velocity check
Tue, 12/09/2025 - 06:18 (edited)

PLEASE, READ EVERYTHING.

Contrary to what some people 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 movement 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. That's why everytime I see someone saying that just the delta y is working, because when a creature falls or jumps the Delta Y moves 1 in the coordinate making the code "if Y delta movement > 0" detect something, but that doesn't occur every time with the X and Z delta movement because of the negative coordinates and the extremely small numbers. 

 

In general, delta movement does check speed, but only speed according to world coordinates. It shows whether the mob is moving south, north, east, or west from those coordinates, and how far that mob has moved in a given direction.

 

Here is the image with the delta X and Z:    

Edited by KrathK on Tue, 12/09/2025 - 06:18