Topic category: Help with modding (Java Edition)
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