Mob AI Broken?

Started by gegb1912 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob AI Broken?

Hello!

 

I was making a custom mob called the Hydra.  I won't get into its details here, because it doesn't really matter.  What does matter is that it won't run after players.  It will attack them, but you will have to walk right up to it for the Hydra to attack you.  This isn't really a challenging mob to fight (it's supposed to be a boss) as you can tell.  I also have some other mobs that do work, however...  One is called the stone golem.  This is like the iron golem, but it won't toss you into the air.  It will just attack like a normal mob, but only when you hit it, BUT it will also run after you when you hit it. (To clarify, the stone golem is a neutral mob, the Hydra is supposed to be aggressive/hostile).  I don't really know what to do here!

 

Any help would be greatly appreciated.  Here are some screenshots of the code for each mob.

Here is the code for the Hydra:

https://drive.google.com/file/d/1RjXWghlHIhsvd4pFGYAo-2GhEWPWghx_/view?…

 

And here is the code for the stone golem:

https://drive.google.com/file/d/1QHi4XNQ3etwA7Kx94-f6SGczKMe3pUzM/view?…

 

I know there's not much point to show the both of them but I thought I would anyway.

 

Im sorry if this forum post is really long or confusing, but I wanted to share as much information as possible.

 

TLDR: My custom mob will only attack you when you walk up to it.  It wont run after you.  Pls help.

 

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
insert code block "Attack in…
Sat, 07/11/2020 - 04:14

insert code block "Attack in sight only {false} nearby only {false} entities of type {mob}" before "do melee attack..."

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried adding that to the…
Sat, 07/11/2020 - 15:45

I tried adding that to the procedure, but it still did the same thing...

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
check the checkbox "chase…
Sat, 07/11/2020 - 16:28

check the checkbox "chase after lost sight"

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i tried that, but it is…
Sat, 07/11/2020 - 20:07

i tried that, but it is still doing the same thing...

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want it to stay still…
Sat, 07/25/2020 - 16:24

If you want it to stay still then either do stick in cobwebs or set the speed to 0

Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't want it to stay…
Sun, 08/02/2020 - 16:21

I don't want it to stay still the problem is that it is staying still.

It's a Vanilla bug and it…
Sun, 08/02/2020 - 16:39

It's a Vanilla bug and it happens to vanilla creatures as well, fixed in 1.16 snapshots

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In twilight forest mod that…
Wed, 08/05/2020 - 16:41

In twilight forest mod that was the same issue for the hydra so they kept it and everybody loved fighting the boss. You should keep trying to fix it, you will eventually get it to work.