[1.10] More event hooks and morph "healing" fix #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new event hook for morph ghost spawns, and separates all cancelable events into a Pre-event which can be canceled and a Post-event which occurs only after the corresponding action occurred successfully.
Included also is a fix for a new bug that occurs with ToughAsNails installed and difficulty set to Hard, which only surfaces with the upcoming Forge build (to succeed 12.18.3.2422). With the upcoming Forge build, morphing into a chicken should no longer kill you, however, morphing back into a mob with higher health would result in your HP being reset to full regardless of how much HP you had before you morphed. The fix I have given records the HP ratio that the player had before they morphed, to prevent using morphs to cheese heal.
I can PR these changes to other branches as needed.