Applying Potion Effect to Target Entity when Hit

Started by quinmn on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Applying Potion Effect to Target Entity when Hit

Hi, just some coding issues at the moment. I am trying to make a wither crown item that allows the player to apply wither effect to entities when the player hits something (fire aspect for wither effect). So far I have:

 

          When (entity attacked):

If:   Has (event/target entity) in inventory (wither crown)

do:  Add potion with level (1) for (100) ticks ambient (true/false [tried both]) particles (true) to (event/target entity) type (wither)

 

Whenever I attack a zombie, for example, neither the player or the zombie gets the wither effect. Any help or clarification would be really helpful. Kinda new to this so if the solution is obvious, that's why.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello. Try to replace it …
Mon, 06/07/2021 - 08:22

Hello.

Try to replace it "event/target entity" to this "sourse entity" at this point: "If:   Has (event/target entity) in inventory (wither crown)"