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 #486 - when you log off on a ship and it moves, you should log on still in the ship, not in the middle of nowhere #937

Conversation

m-doescode
Copy link

Fixes #486

When you log off on top of a ship, or in mid-air within 4 ticks of jumping off a ship (can be changed), the id of the last ship you stood on, as well as your position in the ship's chunk claim is saved as nbt. When you reconnect, and you have the LastShipId tag, and it points to a valid ship, then the chunk claim position is translated to the world position and you are teleported to that position.

Please let me know of any errors/considerations. Thank you.

@CLAassistant
Copy link

CLAassistant commented Aug 7, 2024

CLA assistant check
All committers have signed the CLA.

@m-doescode m-doescode force-pushed the 1.20.1/feature/teleport-reconnected-players branch from ac068a1 to 666446b Compare August 7, 2024 20:35
Copy link
Contributor

@ewoudje ewoudje left a comment

Choose a reason for hiding this comment

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

LGTM except the small move to the config. Thanks for the PR!

… reconnected player teleportation to be disabled
Copy link
Contributor

@ewoudje ewoudje left a comment

Choose a reason for hiding this comment

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

Thanks allot!

@ewoudje ewoudje merged commit 8142bb8 into ValkyrienSkies:1.20.1/main Aug 15, 2024
5 checks passed
xiewuzhiying pushed a commit to xiewuzhiying/Valkyrien-Skies-2 that referenced this pull request Aug 28, 2024
… should log on still in the ship, not in the middle of nowhere (ValkyrienSkies#937)

* Added basic implementation of teleporting disconnected players back onto ships

* Removed print statements

* Extracted MAX_ONBOARD_TICKS from magic number

* Moved MAX_ONBOARD_TICKS to a config option, and added the ability for reconnected player teleportation to be disabled

---------

Authored-by: m-doescode <[email protected]>
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.

3 participants