Jump to content

[1.7.10] [SOLVED] onEntityDamaged amount


AndrewFM

Recommended Posts

The value contained in event.ammount for onEntityDamaged -- is that the amount of damage before armor/potion effects/etc are applied, or the amount of damage after all of that has been factored in?

 

Also, is there an event for the opposite case? I'd like to be able to modify the damage for both.

Link to comment
Share on other sites

Neither - some effects, such as weapon enchantments, the attacker's potion effects, etc., have been applied, but the defender's armor and defensive bonuses have not yet been factored in.

 

No, there is no event that triggers after those have been accounted for - you can see the logic flow in EntityLivingBase#damageEntity for exactly which things are not yet factored into the damage when the event is posted.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.