Topic category: Help with Minecraft modding (Java Edition)
"I got two problems, and writing about them ain't one."
I'm trying to make a zombie poison feature in my mod, unfortunately I have no idea how to check when a player gets hit by a certain mob (mob is vanilla).
I looked for the answer but all I got were incomprehensible feelings and a stupid mask guides on how to apply said features to entities made by the mod, that and some outdated topic that doesn't work, wouldn't even have worked for me, and then spiraled into madness.
I found this code from a post, which I kinda understood... but I don't know what to do with it.
Don't care, too long: Problem is I want to make sure the attacker is a #minecraft:zombie, they melee the player, and the player is given an effect.
Another thing is that I looked for a Quilt Generator, but couldn't find one... does Fabric work fine?
Make a procedure that checks when an entity attacks. If it is your zombie, give the entity the closest poison.
I'll try that
It kind of worked, thanks! Entity attacked provides a "sourceentity" along with a "entity" dependency which helps it be more precise on who to attack.