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

refactor/simplifying_code #3337

Merged

Conversation

SnowRunescape
Copy link
Contributor

Subject: Simplification of Code - Enhancing Efficiency

@zardoy
Copy link
Contributor

zardoy commented Mar 29, 2024

I just wonder why maxDistance was chosen to be 255 instead of 5? It's seems to be more logical to replicate the vanilla behaviour …

@SnowRunescape
Copy link
Contributor Author

SnowRunescape commented Mar 29, 2024

I just wonder why maxDistance was chosen to be 255 instead of 5? It's seems to be more logical to replicate the vanilla behaviour …

good question, i removed only the code repetition

@wgaylord
Copy link
Contributor

I just wonder why maxDistance was chosen to be 255 instead of 5? It's seems to be more logical to replicate the vanilla behaviour …

I think its because its used for finding a block in line of sight? Such as it your looking around, 256 seems like it would allow for seeing what block your looking towards out to 15 chunks away from the player at max.

That is just my thoughts on it.

@rom1504 rom1504 added this to Needs triage in PR Triage Apr 19, 2024
@rom1504 rom1504 merged commit dc70f93 into PrismarineJS:master Apr 28, 2024
21 of 22 checks passed
PR Triage automation moved this from Needs triage to Closed Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
PR Triage
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

4 participants