Minecraftforge: Missing Potion Hooks

Created on 2 May 2017  路  7Comments  路  Source: MinecraftForge/MinecraftForge

We have currently no events firing on adding/changing potion effect to a living entity, I think this should be changed.
I suggest a event for:

  • EntityLivingBase.onNewPotionEffect
  • EntityLivingBase.onChangedPotionEffect
  • EntityLivingBase.isPotionApplicable
  • EntityLivingBase.onFinishedPotionEffect EntityLivingBase.removePotionEffect

bacause I want to manipulate the effects of the player and a tickhandler whould be a bit overkill.

Most helpful comment

I opened a new PR to fix this.

All 7 comments

Do we need separate added and changed events? Could we not just have a way of checking whether the effect was already applied?

I thorugh about sub events like the tick event. For added/changed I think a boolean is enough.

This issue has been automatically marked as stale because it has not had activity in a long time, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

I opened a new PR to fix this.

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___." or "Here's a screenshot of this issue on the latest version"). Thank you for your contributions!

The PR is still open. I have refractored my code so some feedback would be nice.

Let this go stale, the discussion can continue on the PR.

Was this page helpful?
0 / 5 - 0 ratings