I can't get my mob to stop targeting even when it was working before

Started by CrazyOlHoboJoe on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't get my mob to stop targeting even when it was working before

I am trying to make a horror mod that includes Herobrine. I want it to just watch from afar but when the player gets close or attacks it will attack back. I want this too include getting shot where Herobrine will come close to fight the player. Once the player leaves a 20 square cube area it will stop chasing (unless it is approaching after getting shot). The problem is I can't get it to stop chasing. What's even more frustrating is that it was working before and I'm not sure what I changed to get it  to stop working.

Here's what I know: The command I am using is still working for changing the target to none.

None of the procedures seem to be causing the issue as far as I'm aware. I've stripped them all down of their code and even just put attack back in the goals section and changing the target to none in the procedure section but even that seems to not work.
It seems like something is continually setting the target back to player. Using the print command I can see it jumping from null back to player.

Again this was working perfectly fine before and before attacking everything is functioning as intended (nothing is constantly switching the target to player until after). I will post all relevant code. I cannot find the issue.

https://postimg.cc/ykj9nDPt

(I hope that link works)
Probably don't need to worry about most of that code ^^^
As I said I removed most if not all of it and the problem persisted