How to make an entity attack any other entity if it has a potion effect.

Started by 0NullVoid0 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an entity attack any other entity if it has a potion effect.

So, I'm trying to make my entity attack any other entity but only if that entity has a targeting effect, but can't find out how because there's no way (as far as I know) to check the entity that will be targeted in attack conditions. please help, thx.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on the entity tick update…
Fri, 05/02/2025 - 21:49

on the entity tick update trigger: https://ibb.co/XrB7NkXR replace jump boost with the effect you want, 20 is the range of the entity, you can set it to any number

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thx, I'll try that.
Fri, 05/02/2025 - 23:53

thx, I'll try that.