Make a mob attack everything other than its own species?

Started by DoctorHyena on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a mob attack everything other than its own species?

Pretty self-explanatory but basically I want to know what condition I'd set up to make it to where my hyena attacks everything except for other hyenas.

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe something like If:not…
Wed, 02/16/2022 - 05:20

Maybe something like If:not hyena then return true

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you send a screenshot…
Wed, 02/16/2022 - 05:36

Can you send a screenshot example?

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can't do this with…
Wed, 02/16/2022 - 11:12

You can't do this with Mcreator in a fast way (without coding)

You have 2 solutions only:

 

1) you select in AI every single line for mob he must attack

2) You use trigger entity attacked and cancel trigger but this way your hyaenas will stay one near the other looking at each other

 

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, I wouldn't mind using…
Wed, 02/16/2022 - 17:24

Well, I wouldn't mind using a code snippet if anyone has time to send one. That'd probably be the best way to do it.

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey author even if I may be…
Wed, 11/27/2024 - 02:35

Hey author even if I may be 2 years late I actually had the same problem but I was able to find out how to fix this I hope this helps you or anyone else who had this problem. https://ibb.co/RCjsRRG 

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Btw you can use tags in…
Wed, 11/27/2024 - 02:37

Btw you can use tags in order to use this for many entities, (like if you want zombies, husks, skeletons etc..  to not attack each other) or a subtype for a specific entity (so only zombies don't attack each other)