Skip to content

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

Open
williambl wants to merge 1 commit intoLadysnake:1.20from
williambl:fix-packet-error
Open

fix: client crash when trying to send recalling packet after leaving server#64
williambl wants to merge 1 commit intoLadysnake:1.20from
williambl:fix-packet-error

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