How do I make entities stop shooting?

Started by Imadumdum on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make entities stop shooting?

I want to make a boss that shoots you when it's above 50% health and does melee attacks if the health is lower. somebody please tell me if this is possible, and if so a way to do it.

 

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can try that : create a…
Wed, 01/04/2023 - 14:54

you can try that :

  1. create a variable in your entity that refresh every tick.
  2.  say that your variable is true if the actual life of your entity is at 50% or more.
  3. in the entity AI, say that the entity do mele AND ranged attaks.
  4. add a condition to these blocks : mele attacks only if your variable is false and ranged attacks only if your variable is true.