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

Add view-distance setter #2155

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

ImMorpheus
Copy link
Contributor

Fix #1682

In stable-7 Player#getViewDistance was used on the client to get the clientside view-distance setting. In api-8 the method was moved to ServerPlayer but the setter was missing.

@ImMorpheus ImMorpheus added the api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023) label Jul 4, 2020
@ImMorpheus ImMorpheus requested a review from gabizou as a code owner July 4, 2020 20:03
@ImMorpheus
Copy link
Contributor Author

Actually, getViewDistance still refers to the client view-distance. We're hijacking CPacketClientSettings to know the client setting, since the client is telling us its view-distance.

This PR is still valid but the methods need to be renamed.

concept (ignore the names)

getClientSideViewDistance -> this is the setting on the client. The client tells us what it is and we can't change that.
getServerSideViewDistance -> server-side view-distance, enforced (the client-side view-distance is ignored if this is set) 
setServerSideViewDistance -> setter for the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants