Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mob attacks using setHealth #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

democat3457
Copy link

@democat3457 democat3457 commented Oct 24, 2021

Fix several mobs using setHealth to directly decrease the target's health.

This method bypasses death, causing several errors with other mods, and even the player itself, when the entity falls below 0 health as a result of these mobs attacking.

As such, this PR fixes that by using attackEntityFrom with an armor-bypassing damage source, applying direct damage to the entity while still calling death and other hurt-related actions properly.

* Fix brute zombie attack

* Fix brute wither skeleton attack

* Fix brute skeleton attack

* Fix brute pig zombie attack

* Fix ember blaze attack

* Fix inferno blaze attack

* Fix fighter ghast attack

* Fix unholy ghast attack

* Fix vampire pig zombie attack
@Colin-J-Wood
Copy link

This commit would fix the crash related to #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants