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

Add "Swing On Abilities" #1127

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

Conversation

Manchick0
Copy link
Contributor

Introduced a simple configuration option to enable hand-swing animations for items with right-click abilities.

Introduced a simple configuration option to enable hand-swing animations for items with right-click abilities.
@LifeIsAParadox LifeIsAParadox added the reviews needed This PR needs reviews label Jan 6, 2025

@Init
public static void init() {
UseItemCallback.EVENT.register((player, world, hand) -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be a lot safer to mixin and call whatever code is needed to trigger just the animation since this manually sends a packet to the server. It's also means we (and other mods) can use this event to cancel an item use rather than having to mess around with event phases and init prioritization.

@LifeIsAParadox LifeIsAParadox added changes requested This PR need changes and removed reviews needed This PR needs reviews labels Jan 7, 2025
@AzureAaron AzureAaron added the new feature This issue or PR is a new feature label Jan 7, 2025
Refactored the swing animation logic into a mixin.
@LifeIsAParadox LifeIsAParadox added reviews needed This PR needs reviews and removed changes requested This PR need changes labels Jan 7, 2025
@Manchick0 Manchick0 requested a review from AzureAaron January 7, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature This issue or PR is a new feature reviews needed This PR needs reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants