GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.89k stars 272 forks source link

Fix wrong coordinates in isSnowy #1075

Closed Muqsit closed 4 years ago

Muqsit commented 4 years ago

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 commented 4 years ago

Thank you for your contribution to Glowstone!