Started by
a guy called l…
on
Topic category: Help with Minecraft modding (Java Edition)
As you know, the whiter does not fire projectiles, but is an entity. my question is: how do I make an entity that ONLY advances in one direction at constant speed? I know how to make it damage the player (if the entity collides with the player: deal X damage, despawn current entity)
hmmm why dont you make a procedure for mob telport forward 1 every tick and have no mob movements in Ai
I already solved it (like a projectile) and that's why you have to deactivate gravity (you had to put something in the code, look for "mcreator non-gravity projectile) and you should see the question
BUT I have a problem with teleportation, because this is from each coordinate, I don't know how to make it continue in one direction and that this is the one it is looking at, because I can do "teleport entity to: X + 1 Y Z + 1 but this teleports him to one direction constantly even if he wasn't even looking that way. My only theory is to try to approximate the direction you are looking at (get yaw of current entity) and depending on the direction make the X Y Z change for example (in the section each entity tick): if: get yaw of current entity is ≥ 180 (let's say look down) do: set location of current entity to X-1 Y Z or if: get yaw of current entity is ≥ 60 (let's say look towards the middle of X and Z) do: set location of current entity to X-1 Y Z + 1 That is not the only idea and I hope there is another simpler solution (in the mod that I am doing there a boss that makes lunges)