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

Fixed glider not closing on right click anymore on servers #28

Merged
merged 5 commits into from
Jan 25, 2025

Conversation

Shaddaaa
Copy link

Issue: This PR25 broke right click beeing able to close the hang glider, but only on dedicated servers.

I'm not a 100% confident in the cause of this, as I do not fully understand what is and is not synced between logical client and logical server and how this differs in the case of a SP world vs a dedicated server.
I believe this happens because readSpawnData is only run on the client and this is the only place we add the EntityHangGlider-instance to the map after PR25. I do not know, why this would only affect dedicated servers.
This change adds a gliderMap.put(...) to the server side to fix this issue.

Another issue then appears (only in SP): The glider floats way above the player, this seems to be usually fixed by the call to glider.fixPositions in updateGliders. But here the check depends on the type of EntityPlayer object. This might have also been broken by PR25. But as the whole updateGliders is @SideOnly(Side.CLIENT) it seems sensible to always hand over localPlayer=true in the glider.fixPositions call here and this change indeed fixes the issue.

I tested these changes in SP and on a dedicated server and everything remarked here and in PR25 now works as it should. Maybe someone with more indepth knowledge of the server/client side system of minecraft can explain what I could not here.

@Pilzinsel64 Pilzinsel64 enabled auto-merge (squash) January 25, 2025 12:43
@Pilzinsel64 Pilzinsel64 merged commit ce7167e into GTNewHorizons:master Jan 25, 2025
1 check passed
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