Mob that avoids any mob with a certain potion effect

Started by AmLukas on

Topic category: Help with modding (Java Edition)

Last seen on 23:50, 21. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob that avoids any mob with a certain potion effect

Hey folks, I want to make a potion effect that I would call something like "warding." I want to then make certain mobs that run away from entities with this effect. How would I be able to do this? 

Last seen on 19:25, 27. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Only possible with AI…
Wed, 06/07/2023 - 15:32

Only possible with AI related Manipulation.

Check the Plugins Page. There are Plugins that are really helpful, also I think there was a Plugin that adds some AI related Procedure Blocks.

Last seen on 23:50, 21. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh okay! Thanks a ton!
Wed, 06/07/2023 - 17:46

Oh okay! Thanks a ton!

Last seen on 15:45, 24. Mar 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This doesn't exactly make…
Wed, 06/07/2023 - 18:06

This doesn't exactly make mobs avoid the afflicted entity, but it does keep them a certain distance away from them.

I thought about the interdiction torches from the Equivalent Exchange/Project E mods and set up a procedure to behave similarly.

This procedure runs on the status effect's "On effect active tick", and it checks for nearby entities without the effect and overrides their velocity on specific axes to prevent them from moving too close to the entity with the effect.

Depending on how exactly you want the effect to function, you may want to check for- and include or exclude specific types of entities.

Last seen on 23:50, 21. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Woah man, thanks a bunch! I…
Wed, 06/07/2023 - 20:23

Woah man, thanks a bunch! I will certainly look into adding this :D