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

Cross-dim teleport motion is missing #33

Open
AvionMorna opened this issue Feb 21, 2024 · 5 comments
Open

Cross-dim teleport motion is missing #33

AvionMorna opened this issue Feb 21, 2024 · 5 comments

Comments

@AvionMorna
Copy link

AvionMorna commented Feb 21, 2024

okay so ... when going between gate in the overworld only .. you spawn in front same postion you stepped in at and with the same speed you had when going in the gate
but if you cross dims you spawn behind and stop dead no speed carried and mostly behind the gate exactly above the base block
if gating from vertical to horizontial and you cross dims .. you spawn in front on the top of the gate
going from horizontial to vertical you mostly spawn in front in the same postion you stepped into the gate but no speed is kept
vertical to vertical across dim no speed and behind the gate

@AvionMorna AvionMorna changed the title gating across dims backwards gating across dims issues Feb 21, 2024
@MineDragonCZ MineDragonCZ changed the title gating across dims issues Cross-dim teleport motion is missing Mar 5, 2024
@MineDragonCZ MineDragonCZ removed the Bug label Jan 13, 2025
@MineDragonCZ
Copy link
Member

Can not be fixed as minecraft works the way as it works...

@MineDragonCZ MineDragonCZ closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2025
@Povstalec
Copy link

@MineDragonCZ FYI it can be fixed, you just need to save the player motion right as they enter the gate and then send set delta movement for the player from that as the exit the gate.

Here's an example of code you can use to do it in case you're interested:
https://github.com/Povstalec/StargateJourney/blob/822542dfa3b3f8cd59befd177da4ddc6a6227d29/src/main/java/net/povstalec/sgjourney/common/stargate/Wormhole.java#L286C12-L286C18

@MineDragonCZ
Copy link
Member

@MineDragonCZ FYI it can be fixed, you just need to save the player motion right as they enter the gate and then send set delta movement for the player from that as the exit the gate.

Here's an example of code you can use to do it in case you're interested: https://github.com/Povstalec/StargateJourney/blob/822542dfa3b3f8cd59befd177da4ddc6a6227d29/src/main/java/net/povstalec/sgjourney/common/stargate/Wormhole.java#L286C12-L286C18

that is exaclty what im doing now. But for some reason it is not working cross-dimensionaly

@MineDragonCZ MineDragonCZ reopened this Feb 26, 2025
@Povstalec
Copy link

Povstalec commented Feb 26, 2025

that is exaclty what im doing now. But for some reason it is not working cross-dimensionaly

How odd, are you sure you're also properly syncing the serverside player motion with client using a motion packet?
https://github.com/Povstalec/StargateJourney/blob/53dd9f1419e39f28405e4533406b3d67beaa024d/src/main/java/net/povstalec/sgjourney/common/stargate/Wormhole.java#L285

The client needs to be updated with the motion right after the motion is set on server, otherwise the 0 client motion will override any server motion as soon as the client player sends its next packet to the server

@MineDragonCZ
Copy link
Member

MineDragonCZ commented Feb 26, 2025

that is exaclty what im doing now. But for some reason it is not working cross-dimensionaly

How odd, are you sure you're also properly syncing the serverside player motion with client using a motion packet? https://github.com/Povstalec/StargateJourney/blob/53dd9f1419e39f28405e4533406b3d67beaa024d/src/main/java/net/povstalec/sgjourney/common/stargate/Wormhole.java#L285

The client needs to be updated with the motion right after the motion is set on server, otherwise the 0 client motion will override any server motion as soon as the client player sends its next packet to the server

I can take a deeper look later, but I'm almost sure that packet is sent correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants