Started by
SuperfreekYT
on
Topic category: Help with Minecraft modding (Java Edition)
Hi. I was planning to create a Totem (like a totem of undying) that heals the player if he hits an undead mob (Zombie, Skeleton, etc.). That should only happen if the Totem is in the offhand. How do I do that???
set global trigger "if entity attacked"
if item in offhand of SOURCE ENTITY = your item
AND event/target entity = undead (i dont know how its called and where to find)
do set health of source entity (current health of source entity) + health value that you want
You could do something like this:
Create a procedure with a global trigger that checks to see if the entity that was attacked is undead, and if the attacker is holding the item you want.
Thank you very much :)