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

Hand handling improvement #2142

Open
wants to merge 72 commits into
base: 1_20_5
Choose a base branch
from

Conversation

Codestech1
Copy link
Contributor

@Codestech1 Codestech1 commented May 18, 2024

This pull request:

  • Allows to swing a hand for a living entity
  • Calls an EntitySwingHandEvent in LivingEntity#swingHand(Hand) method instead of in a packet listener.

I think that it would be nice if this pull request was merged, because we could avoid messy code like this.

mworzala added 23 commits May 5, 2024 13:49
…t to correct drink/eat time from component, send damage event on living entity damage
/**
* Represents the main or off hand of the player.
*/
public enum Hand {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should stay on Player. Even if it is slightly incorrect (eg for LivingEntity#swingHand to take a Player.Hand), I believe most people will look for player hand. Also makes this change less breaking

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 don't know if it's that breaking, using Player.Hand is still correct. Do you still want this enum to be in a player class?

@mworzala mworzala force-pushed the 1_20_5 branch 2 times, most recently from 95f7327 to 05a4bb7 Compare May 27, 2024 19:06
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.

None yet

4 participants