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 the healing axe not healing entities when attacking them #498

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EmperorSuper
Copy link

Currently the healing axe doesn't actually heal mobs like its description says it should because of a bug/typo, the original code has target.getHealth() < target.getHealth() as a condition to heal
The description says "it will take some health from you and use it to heal the target, with a slight bonus", considering what pack this is i interpreted that as taking a quarter heart less than it heals

I'm a pretty new player and I don't have access to the dev discord channels so I'm not sure how exactly this will affect balance so I'll leave discussing that to the actual developers.

@Dream-Master Dream-Master requested a review from a team March 19, 2025 15:10
Comment on lines +35 to +39
if (player.getHealth() - (k - 0.5F) > 0F) {
player.setHealth(player.getHealth() - (k - 0.5F));
} else {
player.attackEntityFrom(DamageSource.causePlayerDamage(player), (k - 0.5F));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this drains player health even if the clicked entity is not healed, I think it should only drain player health based on health given to the entity

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.

4 participants