Started by
AliveWater
on
Topic category: Help with Minecraft modding (Java Edition)
So I'm making a custom enchant (like a lot of custom enchantments) that are supposed to deal percentage damage. As in +50% damage to a specific type of mob. However I can't figure out how to make the enchant +50% of the sword damage to the mob (NOT 50% OF THE MOB'S HEALTH!). I can detect what mobs are being hit but can't get the damage itself to work. Does anyone know how to do this?
Edited by AliveWater on Sun, 09/29/2024 - 18:01
Use damage procedures. You can call a number dependency called amount. If you look on the right side of the procedure window you can see all the data that the trigger provides you and you can use. As long as the trigger is on entity is hit or entity is hit with tool or something like that then you can get a damagesource (the player who damaged the entity) and the dependency amount (the damage amount the player did to the entity). The procedure block is in advanced i think.
Thanks!