-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
…ict with `PlayerEntity::attack`
mappings/1.1#12w03a.tinydiff
Outdated
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would tryDamage
work?
this is most probably my final work for 1.12.2 directly