How do you make entity1 not attack entity2 if entity2 has a certain potion effect?

Started by PeskySpyCrab on Tue, 01/12/2021 - 12:41

Topic category: Help with modding (Java Edition)

Last seen on 18:39, 16. Jan 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do you make entity1 not attack entity2 if entity2 has a certain potion effect?
Tue, 01/12/2021 - 12:41

I'm working on a xenomorph mod for fun but I don't want the xenos to attack entities that have a chestburster

Last seen on 15:44, 25. May 2022
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you should add a condition…
Thu, 02/11/2021 - 15:01

you should add a condition on the "attack entities of type" AI procedure block

Should be like this:

IF Has (Source Entity) active potion: (*your potion*)

    Do

    Return: false

Return: true

 

Hope this helps.