Skip to content

Fix wrong coordinates in isSnowy #1075

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

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Fix wrong coordinates in isSnowy #1075

merged 1 commit into from
Jan 17, 2020

Conversation

Muqsit
Copy link
Contributor

@Muqsit Muqsit commented Jan 17, 2020

The values of x and z variables over here are absolute world coordinates (the coordinates aren't relative to the chunk). Adding sourceX and sourceZ (the absolute coordinates of the chunk's beginning) sets the value far too high.

Possibly, the author was trying to do something like this: https://github.com/GlowstoneMC/Glowstone/blob/dev/src/main/java/net/glowstone/generator/objects/Lake.java#L95

But in Lake.java, x and z are coordinates relative to the chunk so it makes sense in Lake.

@mastercoms mastercoms merged commit 9b7d569 into GlowstoneMC:dev Jan 17, 2020
@mastercoms
Copy link
Member

Thank you for your contribution to Glowstone!

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.

2 participants