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 lighting levels above and below the world #122

Open
stackotter opened this issue Sep 10, 2022 · 0 comments
Open

Fix lighting levels above and below the world #122

stackotter opened this issue Sep 10, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@stackotter
Copy link
Owner

I'm making this an issue because I'm trying to make it easier to start contributing and this seems like a good first issue.

Currently when above or below the world, the light level is set to the default value (0). To match vanilla's behaviour, it seems like when above the world, you get the light value of the block in the same column but at y level 256, and when below the world, you get the value of the block in the same column but at y level -1. Because of the way the lighting engine works, light levels are calculated from y level -1 (1 below the world) to y level 256 (1 above the world) inclusive, and Delta Client does this already. The only part that needs to be implemented is checking if the requested block is outside those bounds and if it is, calculate the equivalent position (a little more involved when block indices are used instead of positions) and use that instead.

@stackotter stackotter added bug Something isn't working good first issue Good for newcomers labels Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant