Target the source entity instead of the target one

Started by Saiber Rida on

Topic category: Help with Minecraft modding (Java Edition)

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