Posted December 5, 20177 yr I found 2 ways of doing this but they both seem the wrong way. I made my own stat system with nbt on items and if player has a total of say 50 dmg, i want the weapon to do 50 dmg. Here are the 2 ways i did this that i think are wrong firstly i tried just setting mob health but that has issues, the mobs don't drop any items then. secondly, i tried using the attackentityfrom method and making it unique so i can identify it and not make an infinite loop, but this looks like a disaster in the making if (event.getSource().isDamageAbsolute())return; event.getEntityLiving().attackEntityFrom(event.getSource().setDamageIsAbsolute(), combinedDMG); event.setCanceled(true); Am i missing the true way of doing this? And no i can't just change the dmg of items, there is crit chance, lifesteal etc to calculate too. EDIT I THINK I FIGURED IT OUT, sec Edited December 5, 20177 yr by robertx555
December 5, 20177 yr Author Can close the thread, i read some other thread here the suggestion to open type hierarchy made me realize LivingDamageEvent event exists and that i can change the amount there with setamount! There is a class called ForgeHooks that contains all the events Edited December 5, 20177 yr by robertx555
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.