Topic category: Help with Minecraft modding (Java Edition)
I've been unable to get my entity to path toward its target in the EntityTickUpdate trigger. My procedure looks something like this:
-If provided world is not client side AND Does entity exist in a cube size 20 of type: Pillager
-Set target for Event/Target Entity to: Get nearest entity of type Pillager in a square cube 20
-If X position of: Get entity being targeted > 2 AND Z position of: Get entity being targeted > 2
-Attempt to make Event/Target Entity path to X position of: Get entity being targeted, Y, Z position of: Get entity being targeted
(It worked briefly and I'm not sure what I changed to break it. Even when it worked my entity would path to the pillager, then stop randomly sometimes)
Thanks for any advice
Try in the check if the mob is further then 2 blocks away to set it to OR bcs if the mob is 1 block away on the x axis but 10 blocks away on the z axis the mob wont path find only on diagonals
Unfortunately that one didn't work. I think it has something to do with the "OnEntityTickUpdate" part or not knowing which entity is the Event/Target Entity. Still not sure though