Target the source entity instead of the target one

Started by Saiber Rida on

Topic category: Help with modding (Java Edition)

Last seen on 21:08, 17. Feb 2024
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Target the source entity instead of the target one
Thu, 07/23/2020 - 13:29 (edited)

I want to make an item that does stuff to the player through hitting another entity, but it seems that you can't refer to the player doing the action.

 

For example, if I want to make an item that heals me and vanishes through hitting another entity, it will just heal said entity and remove this item in case that entity has it

 

EDIT: Also, is there a way to target an entity without any direct connection? like, just deal damage to the nearest mob or to the mob you're looking at

Edited by Saiber Rida on Thu, 07/23/2020 - 13:29