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

feat[1.12.2]: Map almost all parameters and fields #172

Merged
merged 6 commits into from
Feb 17, 2025

Conversation

ENDERZOMBI102
Copy link
Contributor

@ENDERZOMBI102 ENDERZOMBI102 commented Feb 11, 2025

this is most probably my final work for 1.12.2 directly

@ENDERZOMBI102 ENDERZOMBI102 marked this pull request as draft February 11, 2025 16:12
@ENDERZOMBI102 ENDERZOMBI102 marked this pull request as ready for review February 11, 2025 16:42
@ENDERZOMBI102 ENDERZOMBI102 marked this pull request as draft February 11, 2025 22:41
@ENDERZOMBI102 ENDERZOMBI102 marked this pull request as ready for review February 11, 2025 22:42
@@ -16,7 +16,7 @@ c net/minecraft/unmapped/C_1013763
m (F)V m_3300694 m_3300694
p 1 p_1
m ()F m_6481881 m_6481881
m (Lnet/minecraft/unmapped/C_6385858;)Z m_9004216 attack
m (Lnet/minecraft/unmapped/C_6385858;)Z m_9004216 tryAttack
Copy link
Member

Choose a reason for hiding this comment

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

Having looked at the relevant methods, I think it'd make more sense to change the one in LivingEntity. PlayerEntity.attack handles things like hunger and item damage, in addition to dealing damage to the target entity. LivingEntity.attack only handles dealing damage. So I'd rename that one to something like doDamage or dealDamage. What are your thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've used tryAttack, as i explained on discord, because it can fail, plus its what yarn calls it on 1.14+.

this said, doDamage and dealDamage while might be more descriptive, sound a bit more confusing, as one expects an entity to attack, not to just "do damage"; but if you think its better, i can rename it to either of the two, don't want to stall this for an opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would tryDamage work?

@SpaceWalkerRS SpaceWalkerRS merged commit 86e4700 into OrnitheMC:gen2 Feb 17, 2025
25 checks passed
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