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

fix: client crash when trying to send recalling packet after leaving server #64

Open
wants to merge 1 commit into
base: 1.20
Choose a base branch
from

Conversation

williambl
Copy link

fixes #62

If the player leaves the server while SincereLoyalty.failedUseCountdown <= 0 && SincereLoyalty.useTime > 0, then tickTridentRecalling on the next client tick will return a non-null RecallStatus, thus triggering a impaled:recall_tridents packet to be sent. But since the client is not connected to a server, upon trying to send this packet the client crashes.

This is fixed by checking in tickTridentRecalling whether the player is null - if it is, then failedUseCountdown and useTime are reset to 0 and null is returned.

Also two changes without which the mod did not compile for me:

  • updated gradle wrapper to 8.8
  • updated fabric-loom to 1.7-SNAPSHOT

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.

1 participant