How do I make an entity give an effect to another entity after hitting it with a projectile

Started by Xiela1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make an entity give an effect to another entity after hitting it with a projectile

I'm making an entity that flies and shoots at the player, but I want it to give a poison effect to the entity it shoots, as if it were shooting "poison arrows".

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make an unobtainable ranged…
Thu, 07/21/2022 - 22:39

Make an unobtainable ranged item with the properties and appearance you want; then, make a procedure under 'When Projectile Hits Living Entity' that adds the poison effect to the target entity. (Make sure it's the target entity, not the source entity, which would poison whichever mob shot it.) Then, for your custom mob, in the AI settings, make it shoot the custom ranged item for its attack.