Erratic Mob Chasing/Attacking Behavior

Started by whales0ng on

Topic category: Help with modding (Java Edition)

Last seen on 04:26, 2. Jul 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Erratic Mob Chasing/Attacking Behavior

I’ve encountered a serious problem with my custom mob’s movement as it attempts to chase and attack its target:

  • The model spins and jolts around during movement, making it struggle to catch up to a fleeing target
  • The mob sometimes seems unable to deal damage to its target, even if it is right on top of it - it may or may not succeed in dealing damage after a delay
  • Here is a clip demonstrating the problem: https://youtu.be/lHNZEsFEn9U?si=M4RWVaH-06JKx1kH

    I suspect that this may have something to do with the mob’s hitbox, as that has been giving me a bit of grief as well due to MCreator only allowing cuboid hitboxes (separate thread asking about that here: https://mcreator.net/forum/107909/custom-entity-hitboxes-length-and-width)

    If anyone has any ideas regarding how to fix this, I would be very grateful to hear them. Manually editing the code is an option as I am working with friends familiar with Java, I would just need to know what files to edit and where to find them.