Started by
OkayOak
on
Topic category: Help with Minecraft modding (Java Edition)
I have an item designed to heal the player and heal entities the player hits with the item, however if the player hits a villager or an iron golem they will be attacked by the golem. Is it possible to prevent this from happening?
Depending on how you register the hit and stuff, possibly cancel the damage event and only heal?
This helped a lot. Thanks!
For anyone looking for a solution: I used the global event 'Entity attacked', and set the damage event to cancel only when the player is holding the item.