Entity Sprints After Player when Entity sets Player as Target

Started by HerobrineXGami… on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity Sprints After Player when Entity sets Player as Target

hello so the mod im making, i want the mob in it to sprint after a player when it sees it/comes into range of it, how wowld i do this?

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What do you mean exactly by…
Sun, 12/17/2023 - 21:12

What do you mean exactly by sprint?? I would just give the entity a speed effect, and maybe add another animation that would be overlayed over the walking. Although adding speed and just a complete other entity which has a different running animation to spawn and get it is simpler

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i dont know if you still…
Wed, 11/13/2024 - 20:47

i dont know if you still need help but i had the same problem and here is how to fix it (atleast in my case):
-in the mobs AI choose the AI templates "mob aggressive towards player" then in the "attack with speed factor" choose the speed factor of your entity (this will change its speed when it targets the player).
-if you want to change the entities walking animation when it targets the player then set its sprinting or aggressive animation (i dont know how you called it) as the aggressive animation in the animations tab instead of the sprinting animation and it should be done.
Now your entity will have a different speed and walking animation when it targets the player
(i would give some screen shots here but i don't know how to yet)