Started by
Derpy101
on
Topic category: Help with Minecraft modding (Java Edition)
Hey there guys, a new day a new problemb! :D, Its pretty simple if you read the title, I need to get the damage a sword does with a procedure. thats all, Thanks for any help given!
Sorry, I don't really know what you want to do with that damage so I assume that you gonna just show it in the chat. Anyway, to get the damage you just need to set the trigger to "entity attacked" and double click the "amount" in the bottom right of the screen. Here's the example:
https://ibb.co/cw3CnDg
Anyway, hope this helps.
hmm this would be great but do you have any way to get it in, When living entity is hit with tool?
hmm maybe not
let me test something out
Yeah I still need to have it in when living entity is hit with tool, :skull:
I got it to work, All I needed to do was set a variable for the source entity, BTW SOURCE ENTITY IS A PLUGIN, IF YOU FIND THAT THIS IS YOUR SOLUTION, MAKE SURE YOU HAVE THE PLUG IN, IM USING 2021.3 AS OF RIGHT NOW
I'm glad it works out for you. Btw, I'm using 2022.1 so the source entity already been applied into the workspace. Anyway, good luck on your mod :D
good luck on your mod aswell! :D
Can you explain in further detail how you actually got the attack damage of the weapon for the variable?
I've been at this for a while now and can't figure out how to get the attack damage of the item itself, thanks for your time tho
If you use the global trigger on entity attacked. It will give you the attack damage of the item used. Call the number dependency (amount).
I dont know if this gives you the damage before or after taking into account the entities armor value. If the (amount) is after taking into account the armor then get the armor value and use that to get the original damage.