Entity Pathing in Procedures

Started by JohnJohnson on

Topic category: Help with modding (Java Edition)

Last seen on 16:16, 2. Jun 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity Pathing in Procedures

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

 

Last seen on 09:35, 16. Jun 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try in the check if the mob…
Fri, 05/24/2024 - 05:52

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 

Last seen on 16:16, 2. Jun 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately that one didn…
Fri, 05/24/2024 - 14:39

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