Skip to content

Incorret name in net.minectaft.world.entity.LivingEntity::doHurtTarget #326

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

Open
uoay opened this issue Mar 23, 2025 · 0 comments
Open

Incorret name in net.minectaft.world.entity.LivingEntity::doHurtTarget #326

uoay opened this issue Mar 23, 2025 · 0 comments
Labels
bug An error, misspell, incorrect information, or other issue triage Needs attention for triaging and proper assignment of labels

Comments

@uoay
Copy link

uoay commented Mar 23, 2025

Minecraft version: [1.21.4]
Mappings version: [2025.03.16, 2025.03.23]

The second arg in net.minectaft.world.entity.LivingEntity::doHurtTarget is called source, but in reality, it is the entity being attacked rather than the source of the attack.

Just need to check net.minectaft.world.entity.Mob, it override doHurtTarget. The use of itemStack.HurtEnemy() proves that the second arg in doHurtTarget is the hurted entity.

In branch 1.20. x, it is correct and it is called target .

@uoay uoay added bug An error, misspell, incorrect information, or other issue triage Needs attention for triaging and proper assignment of labels labels Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, misspell, incorrect information, or other issue triage Needs attention for triaging and proper assignment of labels
Projects
None yet
Development

No branches or pull requests

1 participant