Jump to content

Changing how difficulty affects damage


Trigonaut

Recommended Posts

I am trying to change the way damage to the player is affected by the game's difficulty.


At the beginning of the vanilla PlayerEntity.attackEntityFrom() method (where these calculations are normally applied), there is a Forge hook for a LivingAttackEvent, but it doesn't seem offer any way to change the damage being dealt by that attack.

I could probably accomplish what I'm looking for by copying all of the code from PlayerEntity.attackEntityFrom() and LivingEntity.attackEntityFrom(). into my subscribed method, but there must be a better way.


How best can I override/bypass the formulas for when a player is damaged at different difficulties?

 

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.