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 modding (Java Edition)

Last seen on 21:55, 2. Aug 2022
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".

Last seen on 10:38, 22. Apr 2024
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.