Started by
vlonabuser
on
Topic category: Help with Minecraft modding (Java Edition)
I know that i need to use attempt to override motion vector block, but i cant find a way to make it move straight to xyz of block that its looking at.
Edited by vlonabuser on Sat, 11/04/2023 - 16:46
You should be able to add the x/y/z values of the entity's look angle vector to their current x/y/z velocities to make them move in the direction they're looking. (The 'x-value of look angle vector,' for example, takes the x component of the vector from the entity's look position.) If you multiply each of these values, it will increase the speed with which the entity moves in that direction.
Here's how I'd do it, very similar to Mindthemoods': (You'll probably want to mess around with the values you divide by, in the example, the 3s and 6)