Mob AI conditions not working

Started by Coolmanz7 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob AI conditions not working

I'm trying to make a mob that attacks all non-undead mobs. I used an attack all living entities block in the AI and used this for the condition.
This didn't work as I think the entity is the one attacking, not being attacked. I tried using a get entity (entity) is targeting for attack block, but that crashed it. Does anyone know how to check for this? Thanks in advance.

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's not the problem…
Sat, 01/24/2026 - 01:32

That's not the problem. Event/target entity refers to the custom mob itself, not the mob it may attack. Using "get entity (entity) is targeting for attack" also doesn't work because it is not targeting the entity yet. Do you know how to get the entity that will be targeted?

Maybe use it for continue to…
Sat, 01/24/2026 - 14:26

Maybe use it for continue to use instead of start condition, at this point the target may have already been set

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That partly worked. The mob…
Sun, 01/25/2026 - 03:20

That partly worked. The mob is now attacking, but is also attacking other undead. Here is the function:
https://imgur.com/a/YDzJ5rh

Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That didn't work. But after…
Mon, 01/26/2026 - 17:10

That didn't work. But after more testing, I've determined it isn't actually running the condition. I put an explode block at the start, and it didn't do that in-game.