How to make a mob walk to a specific position

Started by scorpion981 on

Topic category: Advanced modding

Last seen on 01:42, 12. Feb 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob walk to a specific position

How to make a mob walk to a already choosed position? The position is stocked inside the enity and the block he need to reach with NBT tags. I was thinking of some solution and i just want some help with them:

  1. Spawn a entity that the mob want to attack at the right position. The mob need to have a infinite/really large view range cause he is going to be far of the position
  2. Search in the villagers code to know how do they get to bed. I don't know if its possible and if so i will like to know precisely how.
  3. Make a procedure that spawn an entity (that the mob want to attack) in is range and in the right direction, everytime he reach the entity the entity spawn again in the right direction. Currently i don't know how to do this
  4. Do the same thing of point 3 but he just go in straight line to the right X position and after to the right Z position. Its ugly and i think of some issues that will probally happen (for the 3 too)
  5. If you have another solution, tell me pls!

Sorry if i am not clear

Last seen on 20:43, 19. Jan 2024
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thats a really great idea on…
Thu, 11/18/2021 - 19:25

thats a really great idea on getting custom mobs to a specific spot. ty   :D